From: ZyX <kp-pav@yandex.ru>
To: zzapper <david@rayninfo.co.uk>, "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: Oddity?
Date: Mon, 09 Feb 2015 22:46:20 +0300 [thread overview]
Message-ID: <617731423511180@web28m.yandex.ru> (raw)
In-Reply-To: <XnsA43CB656A8698davidrayninfocouk@80.91.229.13>
09.02.2015, 20:57, "zzapper" <david@rayninfo.co.uk>:
> Hi
>
> e(){echo $1} && e (g)
This command is too odd. Just
echo (g)
does exactly the same. You must read `man zshexpn`, section “Glob Qualifiers”: `g` qualifier stands for “files owned by group ID” and expects group ID as an argument and `G` qualifier is like `(g[$EGID])` (assuming parameter expansion works here (it actually does not)) and takes no parameters.
>
> zsh: missing delimiter for 'g' glob qualifier
>
> e (G) is ok
Do `setopt nullglob` or `setopt nomatch` and you will see that this is *not* OK because `(G)` matches nothing. The only reason this may echo `(G)` is that you have enabled POSIX shell-like behaviour which substitutes glob pattern with itself literally if there are no matches.
>
> --
> zzapper
> https://twitter.com/dailyzshtip
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> http://www.avast.com
next prev parent reply other threads:[~2015-02-09 19:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-09 17:55 Oddity? zzapper
2015-02-09 19:46 ` ZyX [this message]
2015-02-09 22:35 ` Oddity? zzapper
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=617731423511180@web28m.yandex.ru \
--to=kp-pav@yandex.ru \
--cc=david@rayninfo.co.uk \
--cc=zsh-users@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).