From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-workers@zsh.org
Subject: Re: 'whence' question
Date: Tue, 11 Nov 2014 08:52:15 -0800 [thread overview]
Message-ID: <54623EBF.8040308@eastlink.ca> (raw)
In-Reply-To: <141109105139.ZM27532@torch.brasslantern.com>
Got that patch. It works as advertised but I noticed this:
$ whence -vam "zsh*" << QUOTED
zsh is an alias for /usr/local/bin/zsh
zshh is an alias for /usr/local/bin/zsh << CATCHES ALIAS
zsh-RayStyle1 is a shell function << CATCHES FUNCTION
zshh is a shell function << CATCHES FUNCTION
zshh is /usr/local/bin/zshh << CATCHES SCRIPT
zsh is /usr/local/bin/zsh
zsh-RayStyle1 is /usr/local/bin/zsh-RayStyle1 << CATCHES BINARY
zsh is /usr/bin/zsh
zsh is /bin/zsh
$ whence -vam zsh* << UNQUOTED
zsh is an alias for /usr/local/bin/zsh
? zshh ... << MISSES ALIAS
? zshh ... << MISSES FUNCTION
? zshh ... << MISSES SCRIPT
zsh is /usr/local/bin/zsh
zsh is /usr/bin/zsh
zsh is /bin/zsh
zsh-RayStyle1 is a shell function << CATCHES
FUNCTION
zsh-RayStyle1 is /usr/local/bin/zsh-RayStyle1 << CATCHES BINARY
I know that '-m' arguments are supposta be quoted, but, apart from the
above,
I haven't found any situation where it seems to make any difference.
Why would
it miss 'zshh' but find 'zsh-RayStyle1', and why do the quotation marks
change
the order?
binary 'zsh-RayStyle1' might be found in both cases because it's linked:
lrwxrwxrwx 1 28 2014-11-10//13:39:57 zsh ->
/usr/local/bin/zsh-RayStyle1*
... but it still seems strange. And the situation with the aliases and
functions is
hard to understand. Both functions just echo their own name, so it's not
the
contents. For now the moral of the story is to always quote, but why would
one ever *not* quote? I mean is there some valid use of it unquoted, or
is that
just always wrong? If always wrong, they can we 'autoquote' some how?
Complicated! And there's always another gotcha.
The above is not rigorous, but any clarification is welcome.
next prev parent reply other threads:[~2014-11-11 16:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <545A6D66.3080500@eastlink.ca>
[not found] ` <1458.1415209763@thecus.kiddle.eu>
[not found] ` <20141105180035.22f6e9b1@pwslap01u.europe.root.pri>
[not found] ` <141105204330.ZM2973@torch.brasslantern.com>
2014-11-06 21:10 ` Peter Stephenson
2014-11-06 21:58 ` Bart Schaefer
2014-11-08 20:41 ` Peter Stephenson
2014-11-09 18:51 ` Bart Schaefer
2014-11-10 5:15 ` 'whence' question and others Ray Andrews
2014-11-10 8:20 ` Bart Schaefer
2014-11-10 8:23 ` Bart Schaefer
2014-11-10 16:57 ` Ray Andrews
2014-11-10 19:53 ` Vin Shelton
2014-11-11 16:52 ` Ray Andrews [this message]
2014-11-11 19:14 ` 'whence' question Bart Schaefer
2014-11-11 19:38 ` Bart Schaefer
2014-11-11 20:22 ` Ray Andrews
2014-11-11 18:16 ` Ray Andrews
2014-11-11 19:33 ` Bart Schaefer
2014-11-11 20:40 ` Ray Andrews
2014-11-08 21:55 ` Bart Schaefer
2014-11-10 10:04 ` Peter Stephenson
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54623EBF.8040308@eastlink.ca \
--to=rayandrews@eastlink.ca \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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
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).