mysub:10: command not found: my sub #28

cmalven opened this Issue Dec 7, 2012 · 4 comments


None yet
2 participants

cmalven commented Dec 7, 2012

My sub is called cmal and is installed at ~/Dropbox/Dropbox/Config/sub/cmal

My .zshenv contains:

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
eval "$($HOME/Dropbox/Config/sub/cmal/bin/cmal init -)"

Whenever I open a new terminal, and run cmal I get cmal:10: command not found: cmal

If I then run source ~/.zshenv followed by cmal I correctly get the usage.

But every time I open a new terminal window I'm back to square one. Any idea what could be going on?


qrush commented Dec 7, 2012

Interesting! It looks like something is working though, since running cmal does work.

What does which cmal say?

cmalven commented Dec 7, 2012

That's certainly the fastest I've ever had somebody respond to a GitHub issue! Thanks!

→ which cmal
cmal () {
    local command="$1"
    if [ "$#" -gt 0 ]
    case "$command" in
        (shell) eval `cmal "sh-$command" "$@"` ;;
        (*) command cmal "$command" "$@" ;;

qrush commented Dec 7, 2012

I bet it's not finding the sub on your $PATH...which should be happening on cmal init. For example, our sub 37 is installed in ~/.37. On my $PATH is:


...but 37 init (and cmal init) should handle that for you...what does your $PATH look like? Does it have that? (I bet it does after you run your source command)

cmalven commented Dec 7, 2012

Before source:


After source:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment