zsh-users
 help / color / mirror / code / Atom feed
* whence defect?
@ 2018-03-28 13:06 Ray Andrews
  2018-03-28 15:53 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Ray Andrews @ 2018-03-28 13:06 UTC (permalink / raw)
  To: Zsh Users

    /bin $ path
    Current path:
    .
    /aWorking/Zsh/System
    /aWorking/Bin
    /usr/local/bin
    /usr/sbin
    /usr/bin
    /sbin
    /bin

    /bin $ whence -aS zsh
    ./zsh
    /usr/local/bin/zsh -> /aWorking/Bin/zsh5.3
    /usr/bin/zsh -> /aWorking/Bin/zsh5.3
    /bin/zsh -> /aWorking/Bin/zsh5.3

    /bin $

Can that be right? I'd probably prefer that the duplicate find of 
/bin/zsh was detected (current directory and '/bin' explicitly) and 
removed or perhaps noted, but if it is to show up twice why would the 
'dot' version not show that it's a link as the explicit entry does?



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

* Re: whence defect?
  2018-03-28 13:06 whence defect? Ray Andrews
@ 2018-03-28 15:53 ` Bart Schaefer
  2018-03-28 16:41   ` Ray Andrews
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2018-03-28 15:53 UTC (permalink / raw)
  To: Ray Andrews; +Cc: Zsh Users

On Wed, Mar 28, 2018 at 6:06 AM, Ray Andrews <rayandrews@eastlink.ca> wrote:
>
>    /bin $ whence -aS zsh
>    ./zsh
>    /usr/local/bin/zsh -> /aWorking/Bin/zsh5.3
>    /usr/bin/zsh -> /aWorking/Bin/zsh5.3
>    /bin/zsh -> /aWorking/Bin/zsh5.3
>
>    /bin $
>
> Can that be right? I'd probably prefer that the duplicate find of /bin/zsh
> was detected (current directory and '/bin' explicitly) and removed

That'd get very strange to keep track of, given that "." could appear
anywhere in the path, including at the end.  You did ask (-a) for ALL
occurrences.

> perhaps noted, but if it is to show up twice why would the 'dot' version not
> show that it's a link as the explicit entry does?

Hmm.  The code to print whether a command is a symbolic link is using
zsh's internal symlink-chasing routine, but that method only works for
file names starting with "/".


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

* Re: whence defect?
  2018-03-28 15:53 ` Bart Schaefer
@ 2018-03-28 16:41   ` Ray Andrews
  0 siblings, 0 replies; 3+ messages in thread
From: Ray Andrews @ 2018-03-28 16:41 UTC (permalink / raw)
  To: zsh-users

On 28/03/18 08:53 AM, Bart Schaefer wrote:
> That'd get very strange to keep track of, given that "." could appear
> anywhere in the path, including at the end.  You did ask (-a) for ALL
> occurrences.
Sure, that's a legitimate way to look at it tho I'd be 60/40 the other 
way.  I want ALL occurrences but not necessarily two occurrences of 
exactly the same file viewed from two perspectives ... or, nuts, maybe 
the arbitrary location of 'dot' should be permitted to display the 
results of an overlap on the path -- that has to  be the simplest thing 
in either case.  And there is a simple fix anyway, no reason to whine 
for a change.
>
>> perhaps noted, but if it is to show up twice why would the 'dot' version not
>> show that it's a link as the explicit entry does?
> Hmm.  The code to print whether a command is a symbolic link is using
> zsh's internal symlink-chasing routine, but that method only works for
> file names starting with "/".
>
Well I'd still say that's a mistake.  '-S' says show me links and since 
the dot is a legitimate path, it should be handled, no? Following your 
logic above, if I see ALL occurrences, fine, but I should also see ALL 
data even on Tuesday.  The file IS a link and '-S' says show me that.  
Period.

... or remove the duplicate.


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

end of thread, other threads:[~2018-03-28 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28 13:06 whence defect? Ray Andrews
2018-03-28 15:53 ` Bart Schaefer
2018-03-28 16:41   ` Ray Andrews

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