Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Oddity?
- X-seq: zsh-users 19843
- From: ZyX <kp-pav@xxxxxxxxx>
- To: zzapper <david@xxxxxxxxxxxxxx>, "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Re: Oddity?
- Date: Mon, 09 Feb 2015 22:46:20 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1423511180; bh=kF2e+XZTb3KGv8iqDZOSY/ryPVNqNbLllU5ZKRIK7eM=; h=From:To:In-Reply-To:References:Subject:Date; b=gC5TaVLnuY+o5BZAZTHwN6u+iuvxfsu88D85iJUy5OIgNzoMh/j6jUAMUPkLNvuzM jAo8qYXJ/fnWkrneSLkX8eUyxZ2oqoKIXbVwZp271ruWkiJ7ahYsI/PfzAjHSipZz1 CvW2YdVk9aLAGaqjJrU7Sm022LS9uoBwCeuwHuNE=
- In-reply-to: <XnsA43CB656A8698davidrayninfocouk@80.91.229.13>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <XnsA43CB656A8698davidrayninfocouk@80.91.229.13>
09.02.2015, 20:57, "zzapper" <david@xxxxxxxxxxxxxx>:
> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author