zsh-workers
 help / color / mirror / code / Atom feed
* bug: whence -wa / none / argv position
@ 2023-05-27  5:25 Phil Pennock
  2023-06-24  1:55 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Pennock @ 2023-05-27  5:25 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-10 23:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-27  5:25 bug: whence -wa / none / argv position Phil Pennock
2023-06-24  1:55 ` Bart Schaefer
2023-07-10 23:26   ` Phil Pennock

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).