From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: zsh-workers@zsh.org
Subject: bug: whence -wa / none / argv position
Date: Sat, 27 May 2023 01:25:17 -0400 [thread overview]
Message-ID: <ZHGUPWCJjQFbTa2A@fullerene.field.pennock-tech.net> (raw)
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
next reply other threads:[~2023-05-27 5:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 5:25 Phil Pennock [this message]
2023-06-24 1:55 ` Bart Schaefer
2023-07-10 23:26 ` Phil Pennock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZHGUPWCJjQFbTa2A@fullerene.field.pennock-tech.net \
--to=zsh-workers+phil.pennock@spodhuis.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).