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

bug: whence -wa / none / argv position



Invoking `whence -wa` with multiple arguments, where one does not exist,
has different results depending upon whether the non-existing one is
first in the list or not.

% PS1='%?%# '
0% whence -wa ls foo echo
ls: command
echo: builtin
echo: command
0% whence -wa foo ls echo
foo: none
ls: command
echo: builtin
echo: command
1% whence -wa ls echo foo
ls: command
echo: builtin
echo: command
0%

If I use `whence -a` then it _always_ ignores the non-existent foo.

If I use `whence -w` then it _always_ reports `foo: none` and exits 1.

It's when I use `whence -wa` that this only shows the "none" item (and
exits non-zero) when the item is first.

Built zsh at head (no local patches) to confirm this is still current:

    typeset ZSH_VERSION=5.9.0.1-dev
    typeset ZSH_PATCHLEVEL=pdp/master/zsh-5.9-209-g88eeade0b

-Phil




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