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

Re: "command -v"



> There's a discussion on debian-devel about a bunch of packages using
> "command -v" in their scripts, which all debian POSIX shells support,
> with the exception of zsh.  ("command -v" isn't in POSIX, apparently,
> but it's in other standards.)
> 
> Anyway, probably zsh ought to support it, whatever it does.

This might do in a pinch:

command() { case "$1" in -v) shift; whence "$@" ;; *) builtin command
"$@";; esac }



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