* Oddity?
@ 2015-02-09 17:55 zzapper
2015-02-09 19:46 ` Oddity? ZyX
0 siblings, 1 reply; 3+ messages in thread
From: zzapper @ 2015-02-09 17:55 UTC (permalink / raw)
To: zsh-users
Hi
e(){echo $1} && e (g)
zsh: missing delimiter for 'g' glob qualifier
e (G) is ok
--
zzapper
https://twitter.com/dailyzshtip
---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Oddity?
2015-02-09 17:55 Oddity? zzapper
@ 2015-02-09 19:46 ` ZyX
2015-02-09 22:35 ` Oddity? zzapper
0 siblings, 1 reply; 3+ messages in thread
From: ZyX @ 2015-02-09 19:46 UTC (permalink / raw)
To: zzapper, zsh-users
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-09 22:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 17:55 Oddity? zzapper
2015-02-09 19:46 ` Oddity? ZyX
2015-02-09 22:35 ` Oddity? zzapper
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).