Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: The (X) flag.
- X-seq: zsh-users 10451
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh users <zsh-users@xxxxxxxxxx>
- Subject: Re: The (X) flag.
- Date: Tue, 27 Jun 2006 23:51:16 -0700
- In-reply-to: <20060628045752.GN6528@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060628045752.GN6528@xxxxxxxxxxxxxxx>
On Jun 28, 6:57am, Frank Terbeck wrote:
}
} Now I thought it might throw an error when a given pattern doesn't
} match:
No. Failing to match the pattern is not an error, it's one of the
expected possible outcomes.
} However, I guess, I'm misunderstanding the manual. So, could someone
} please give an example of what this flag does?
The errors involved are lexical errors, that is, failures in tokenizing
the string. I can't immediately think of one that affects ${var#pat},
but here's an obvious one with the (Q) flag:
% foo="two ' matched ' quotes"
% print ${(Q)foo}
two matched quotes
% foo="only one ' quote"
% print ${(Q)foo}
only one ' quote
% print ${(XQ)foo}
zsh: unmatched '
%
Messages sorted by:
Reverse Date,
Date,
Thread,
Author