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

Re: Is "command" working right, yet?



On Sun, 25 Sep 2016 20:13:28 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> A complication is that "command -v" is defined in terms of bin_whence(),
> and "whence" has a -p option that means something different.

That also means path search.

I don't understand what any of

command -p -v true
command -v -p true

could possibly mean other than "whence -vp -- true".  The "-p" can't mean
execute along the path in this case, because the "-v" or "-V" clearly
marks this as a query.

Surely it's just a case of finding all the valid options (p, v, V)  and
seeing if there's anything other than "p" present?

The real minefield appears to be what to do with invalid options.

pws



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