Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: parameter and quoting (was: Re: Completion problems.)
- X-seq: zsh-workers 7378
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: parameter and quoting (was: Re: Completion problems.)
- Date: Thu, 05 Aug 1999 15:18:05 +0200
- In-reply-to: "Sven Wischnowsky"'s message of "Thu, 05 Aug 1999 14:53:10 DFT." <199908051253.OAA17004@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Sven Wischnowsky wrote:
> Ah, right, hadn't thought about patterns (ahem)... "${a%'}" reports
> the error.
>
> Hm. Should the proposed new flag apply to those, too, and change the
> current behaviour to not report the error or should the current
> behaviour of (Q) be changed?
The first possibility sounds sensible to me, too, since ksh allows
you to do
a="'"
echo "${a%'}"
although bash complains as well. It's probably a grey area, since the
single UNIX specification says
The double-quoting of patterns is different depending on where the
double-quotes are placed:
${x#*}
The asterisk is a pattern character.
${x#"*"}
The literal asterisk is quoted and not special.
(in the first case they presumably mean the whole expression is quoted), so
properly placed quotes are supposed to be active and this seems to work
OK, i.e. ${a%"'"}.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author