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

Re: whence question

On 14/01/17 09:11 AM, Bart Schaefer wrote:
The options you're changing only matter when globbing FAILS. If the
local file matching grub-r* exists, then globbing SUCCEEDS, and your
option changes mean nothing in context.


Just being devil's advocate here of course but in this case does not the
'm' switch in effect 'state' an exception?  That is, is it not an
explicit request to change the rules vis a vis globing?
No, it isn't, because globbing is done by the shell long before it tries
to execute the "whence" (or any other) command, so at the time globbing
is done "-m" is just another syntactic word with no special meaning.

Yeah, I understand the order of processing (at least that detail), so my idea of special treatment for 'm' would indeed be an exception and could be ruled out for that reason alone. I understand that it's no small thing to suggest it even if it were possible and maybe it simply isn't possible anyway. Still, you hafta admit my first example has to be seen as a defect because 'whence -ma' has no reason to care about local files; globing in that situation is a different animal since whence has different targets. IOW 'whence -ma' only does what it is expected to do when normal globing fails. But perhaps this is so long established that the safe thing to do is to use Daniel's alias. I'll make no further noise about it since I have a solution anyway and it's something I'm used to using.

Besides, it works fine when the glob is quoted and the docs say to quote when using 'm' and that's normal hygiene anyway ... so what am I bitching about ;-) I'm being overly theoretical and wasting people's time.

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