help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: whence output varies with dot vs. realpath in $PATH
Date: Mon, 31 Oct 2022 07:57:16 -0700	[thread overview]
Message-ID: <4f4fb806-fef1-52ba-2559-f2629c823939@eastlink.ca> (raw)
In-Reply-To: <CAN=4vMokJV_kzdsihWQuGt9btmQicQ3XaMMVrzsbZOL_udVE0Q@mail.gmail.com>

On 2022-10-31 07:36, Roman Perepelitsa wrote:
> I did prepend dot to PATH. You can see the full listing of commands in
> my first reply.

Yeah I noticed but I think our situations are different.  I'll bet you 
can duplicate my output if you tinker with your path. Sheesh, what else 
could it be?  Anyway that's a small matter, what's bugging me is the way 
whence doesn't show everything if the dot is not expanded.  Right now 
I'm doing this hack:

ppath=( $( realpath -s $path ) )                            # realpath 
needs spaces between dirs.
PATH=$( echo $ppath | sed -r "s/ /:/g" )                    # put the 
colons back
all_matches=( ${(f)"$( whence -mavS (#i)$1 )"} )    # fire up whence
PATH=$oldpath         # restore PATH

... and I end up with 'everything' being found in the current 
directory.  Pretty horrible tho.  Dunno, what could I have done to make 
that necessary?  Seems to me whence simply doesn't look for files in a 
'dot' directory.  Why else would expanding it change the output?  How 
could that be my breaking something?  Mind, I can break anything.

  reply	other threads:[~2022-10-31 14:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 13:30 Ray Andrews
2022-10-31 13:43 ` Roman Perepelitsa
2022-10-31 14:06   ` Ray Andrews
2022-10-31 14:10     ` Roman Perepelitsa
2022-10-31 14:32       ` Ray Andrews
2022-10-31 14:36         ` Roman Perepelitsa
2022-10-31 14:57           ` Ray Andrews [this message]
2022-10-31 21:18             ` Bart Schaefer
2022-10-31 22:26               ` Bart Schaefer
2022-10-31 22:59               ` Ray Andrews
2022-10-31 23:03                 ` Bart Schaefer
2022-10-31 23:17                   ` Ray Andrews
2022-10-31 23:21                     ` Bart Schaefer
2022-10-31 23:14                 ` Lawrence Velázquez
2022-10-31 23:21                   ` Ray Andrews
2022-10-31 23:38                     ` Bart Schaefer
2022-11-01  0:03                       ` Ray Andrews
2022-11-01  0:31                         ` Bart Schaefer
2022-11-01  0:55                           ` Ray Andrews
2022-11-01  1:08                             ` Bart Schaefer

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f4fb806-fef1-52ba-2559-f2629c823939@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \


* 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


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).