Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
bug: whence -wa / none / argv position
- X-seq: zsh-workers 51802
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: bug: whence -wa / none / argv position
- Date: Sat, 27 May 2023 01:25:17 -0400
- Archived-at: <https://zsh.org/workers/51802>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc
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