From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes Message-Id: <9902031602.AA40342@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk Subject: Re: quote modifier for parameter expansion? In-Reply-To: "Sven Wischnowsky"'s message of "Wed, 03 Feb 1999 16:52:37 NFT." <199902031552.QAA13399@beta.informatik.hu-berlin.de> Date: Wed, 03 Feb 1999 17:02:18 +0100 From: Peter Stephenson X-Mailing-List: 5209 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 Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy