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

Re: 'whence' question



On 11/11/2014 11:14 AM, Bart Schaefer wrote:
On Tue, Nov 11, 2014 at 8:52 AM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
Got that patch.  It works as advertised
If you haven't already, you might want to get minimally familiar with
"git" so you can pull from the development repository rather than
applying individual patches.
Right, I just wanted to have a chew on that patch first. Tricky doing it by hand,
gotta learn to do it correctly.
and see what you get.  I think this will explain all your confusion.
Well, lots of it anyway ;-) in the case of:

    $ whence zsh*
    zsh
    /usr/local/bin/zsh-RayStyle1

... it was just a coincidence that a copy of the latter file was in my current dir, thus a subject for search. It wasn't 'really' scanning the path for "zsh*" in the same way that it would with '-m' active. I got the results I expected, but for absolutely
the wrong reasons.)

For "whence" one probably would always quote patterns.  For most other
commands that operate on file names, one probably wants them unquoted,
so that is the default behavior.  Command line input semantics
including globbing are entirely separate in *nix from the semantics
internal to the command itself -- very unlike DOS where it is up to
the command to invoke globbing on its arguments.
Ok, I think I get it. That's the difference between quoted and unquoted arguments to whence or anything else. One might validly leave ' zsh* ' unquoted, but the meaning is very different. I should already have that written in my DNA, pardon for being
thick headed.



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