From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17093 invoked from network); 7 Feb 2002 19:20:50 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 7 Feb 2002 19:20:50 -0000 Received: (qmail 8451 invoked by alias); 7 Feb 2002 19:20:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16587 Received: (qmail 8438 invoked from network); 7 Feb 2002 19:20:41 -0000 Date: Thu, 7 Feb 2002 19:20:38 +0000 (GMT) From: Bart Schaefer Sender: lantern@brasslantern.com To: Derek Peschel cc: zsh-workers@sunsite.dk Subject: Re: BUG? - 4.0.2 - parameter substitution won't double backslashes in values In-Reply-To: <20020207051955.A26840@eskimo.eskimo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 7 Feb 2002, Derek Peschel wrote: > But I would still expect some change (a backspace should change to "\b" when > using "print", or "\b" should change to "\\b" when using "print -r"). Um, no. With "print" a "\b" changes to backspace; with "print -r", "\b" remains "\b". In either case a literal backspace remains a backspace. If you want to convert backspace and other "control characters" to a visible representation, you can use the (V) parameter flag: zsh% bs=$(print -n '\b') zsh% print ${(V)bs} ^H Note that the conversion from '\b' to backspace was done by print, and the conversion from backspace to ^H was done by parameter expansion. There is no built-in mechanism to convert from backspace to '\b'.