Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: symlink chain.



On Jan 2,  9:53pm, Ray Andrews wrote:
} Subject: Re: symlink chain.
}
} On 01/02/2015 09:03 PM, Bart Schaefer wrote:
} > On Jan 2,  5:08pm, Ray Andrews wrote:
} > }      if (OPT_ISSET(ops,'m') && **argv != '/' ) {
} > }
} > } ... seems to work.
} >
} > I wouldn't use the word "work" exactly.  All that does is turn off the
} > pattern matching entirely.

... for strings beginning with a '/', obviously, not for all patterns.
Which is broken for aliases and shell functions:

torch% /foo() { print Look, I have a slash. }
torch% whence -v /foo
/foo is a shell function
torch% whence -mv '/fo?'	# won't work with the above change
/foo is a shell function

PWS's change for -a only works because it happens so late in the algorithm
that there is nothing left but path to search, and no patterns left to be
tried.



Messages sorted by: Reverse Date, Date, Thread, Author