Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: quote modifier for parameter expansion?
- X-seq: zsh-workers 5209
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: quote modifier for parameter expansion?
- Date: Wed, 03 Feb 1999 17:02:18 +0100
- In-reply-to: "Sven Wischnowsky"'s message of "Wed, 03 Feb 1999 16:52:37 NFT." <199902031552.QAA13399@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Sven Wischnowsky wrote:
> Hm. I'm sure I'm missing something again, but could anyone please tell
> me what? The patch below (which probably shouldn't be used) just uses
> the quote()-function from hist.c to make the `q' modifier in parameter
> expansion work. The result is almost always a funny looking string in
> single quotes, but that alone can't be the reason not to use this
> function.
Does exactly what I would expect it to.
% bar="hello'there"
% print -r $bar:q
'hello'\''there'
Maybe the point is simply it's got limited application, since unless
it's going into an eval the extra quotes aren't all that useful,
unlike in history substitution which happens before the quotes get
swallowed.
--
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