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 From: "Bart Schaefer" Message-Id: <990203092055.ZM11946@candle.brasslantern.com> Date: Wed, 3 Feb 1999 09:20:55 -0800 In-Reply-To: <9902031602.AA40342@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "Re: quote modifier for parameter expansion?" (Feb 3, 5:02pm) References: <9902031602.AA40342@ibmth.df.unipi.it> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@sunsite.auc.dk Subject: Re: quote modifier for parameter expansion? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailing-List: 5211 On Feb 3, 5:02pm, Peter Stephenson wrote: } Subject: Re: quote modifier for parameter expansion? } } 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. } } % 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, Maybe the point is that :q is a csh-ism, and that result is nothing like what csh would produce. In the old days before people worried about 8-bit characters, :q in csh simply set the high-order bit of every character in the variable value. Then those high bits would get stripped off again after all the other substitutions were applied. Thus there was no user-visible change to the string. That doesn't make it useless, but if we keep it, it belongs in the section on differences from (t)csh. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com