From: Bart Schaefer <schaefer@brasslantern.com>
To: Stefan Schmidt <Stefan.Schmidt@gmx.de>, zsh-workers@zsh.org
Subject: Re: whence not behaving as expected with noaliases set
Date: Sun, 20 Nov 2022 21:14:57 -0800 [thread overview]
Message-ID: <CAH+w=7bNr6LrSY83yGkNt0yDJtv89Xw0tpBordmdmZq=suGeJw@mail.gmail.com> (raw)
In-Reply-To: <Y3rYRgGp+QQDqqKI@CptOrmolo.darkstar>
On Sun, Nov 20, 2022 at 5:46 PM Matthew Martin <phy1729@gmail.com> wrote:
>
> On Sun, Oct 23, 2022 at 08:31:58PM +0200, Stefan Schmidt wrote:
> >
> > This works as expected if an alias is defined but if the `noaliases` option is set `whence` still returns the alias (same for `type`, `where` and `which`).
>
> > Am I misinterpreting or misunderstanding something here or is there in fact a contradiction between the documentation and the implementation?
>
> I think your interpretation is correct. This seems straight forward
> enough to fix.
I'm not sure there was intended to be an implication that "whence"
would pay attention to noaliases. If used inside an "autoload -U"
function, for example, it's also going to report the "wrong" thing for
any command names used in that function, regardless of the global
setopt.
If we apply this change, I wonder if we should also extend the -a
option to continue to list aliases despite its current description of
"throughout the command path". It already lists builtins as well as
$path locations.
prev parent reply other threads:[~2022-11-21 5:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-23 18:31 Stefan Schmidt
2022-11-21 1:45 ` Matthew Martin
2022-11-21 5:14 ` Bart Schaefer [this message]
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='CAH+w=7bNr6LrSY83yGkNt0yDJtv89Xw0tpBordmdmZq=suGeJw@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=Stefan.Schmidt@gmx.de \
--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).