Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: which command doesn't work



On Jun 12,  3:52pm, Cesar Romani wrote:
}
} I've installed zsh 4.3.10 on the MSYS environment.

I don't recall MSYS being mentioned here before (in fact I'd never
heard of it at all) so there may not be much we can do for you.

} $which -a less
} /usr/local/bin/less
} /bin/less
} /c/Programmi/GnuWin32/bin/less
} 
} The which command takes the last version of less, although that version
} is located at the end in my PATH. And when I want to use less, the shell
} takes the last version of it. Why?

What does

    ls -l $(which -a less)

show you?  If zsh thinks one of those has execute permission and the
others do not, it'll prefer the executable one even if the others
are earlier in the path.  In fact if none of them appear to have
execute permission it'll probably say "command not found".

You might be able to get zsh to treat a .exe extension as equivalent
to having execute permission if you configure such that it believes
it's in the Cygwin environment.



Messages sorted by: Reverse Date, Date, Thread, Author