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

Re: unknown file attribute



[Forwarding the entire message because Zyx replied to zsh-workers but the
original message was to zsh-users, so some on the latter list may not have
seen Zyx's comments.]

To Manfred:
If you don't want to learn glob qualifiers, "setopt no_bare_glob_qual".


--- Forwarded mail from zyx@xxxxx

From: ZyX <zyx@xxxxx>
Reply-To: zyx@xxxxx
To: zsh-workers@xxxxxxx
Subject: Re: unknown file attribute
Date: Sat, 2 Apr 2011 23:32:59 +0400


Reply to message «unknown file attribute»,
sent 22:33:19 02 April 2011, Saturday
by Manfred Lotz:

These are glob qualifiers: qualifiers `B' and `C' do not exist (that is why you
see this error), but qualifier `A' means `group-readable files' and `D' means
`set GLOB_DOTS option for the current pattern'. As there is no pattern then no
files match it and zsh will behave according to its options:
1. If nullglob is set unmatched pattern is removed from argumnents list and
   `echo (A)' yields just a single newline.
2. If cshnullglob and nomatch are unset unmatched pattern is left as-is and
   `echo (A)' yields `(A)\n'
3. If either cshnullglob or nomatch are set then unmatched pattern prevents
command from executing and `echo (A)' will yield an error (either `zsh: no
matches found: (A)' if cshnullglob is unset or `zsh: nomatch' if it is set).

I suggest you to learn this glob quilifiers as they are really useful in some
situations.

Original message:
> Hi there,
> I accidentally found that:
>
> $ echo (B)
>
> yields:
>
> zsh: unknown file attribute
>
>
> Same for echo (C). However, echo (A) and echo (D) work. Any idea why
> that happens?
>
> I know I could type: "(B)". But I want to save typing the "s.


---End of forwarded mail from zyx@xxxxx
Reply to message «unknown file attribute»,
sent 22:33:19 02 April 2011, Saturday
by Manfred Lotz:

These are glob qualifiers: qualifiers `B' and `C' do not exist (that is why you
see this error), but qualifier `A' means `group-readable files' and `D' means
`set GLOB_DOTS option for the current pattern'. As there is no pattern then no
files match it and zsh will behave according to its options:
1. If nullglob is set unmatched pattern is removed from argumnents list and
   `echo (A)' yields just a single newline.
2. If cshnullglob and nomatch are unset unmatched pattern is left as-is and
   `echo (A)' yields `(A)\n'
3. If either cshnullglob or nomatch are set then unmatched pattern prevents
command from executing and `echo (A)' will yield an error (either `zsh: no
matches found: (A)' if cshnullglob is unset or `zsh: nomatch' if it is set).

I suggest you to learn this glob quilifiers as they are really useful in some
situations.

Original message:
> Hi there,
> I accidentally found that:
>
> $ echo (B)
>
> yields:
>
> zsh: unknown file attribute
>
>
> Same for echo (C). However, echo (A) and echo (D) work. Any idea why
> that happens?
>
> I know I could type: "(B)". But I want to save typing the "s.

Attachment: signature.asc
Description: Transferred from mail from zyx@np.by: This is a digitally signed message part.



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