From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8362 invoked from network); 24 Jul 2003 05:46:54 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 24 Jul 2003 05:46:54 -0000 Received: (qmail 12981 invoked by alias); 24 Jul 2003 05:46:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18898 Received: (qmail 12972 invoked from network); 24 Jul 2003 05:46:46 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 24 Jul 2003 05:46:46 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.252.24.81] by sunsite.dk (MessageWall 1.0.8) with SMTP; 24 Jul 2003 5:46:46 -0000 Received: from pm by debian2 with local (Exim 3.35 #1 (Debian)) id 19fYvs-0006YL-00; Thu, 24 Jul 2003 06:46:28 +0100 To: Julian Foad Cc: dev@subversion.tigris.org, Sebastien Cevey , Clint Adams , zsh-workers@sunsite.dk Subject: Re: [PATCH] bash_completion: improvement, fixes and tests [was: Re: subversion and programmable completion] References: <20030720162723.GA26506@acolyte.scowler.net> <20030721183359.GA11160@cine7.net> <3F1EE28F.50500@btopenworld.com> <87u19dorwe.fsf@codematters.co.uk> <3F1F3685.5040005@btopenworld.com> From: Philip Martin Mail-Copies-To: never Date: Thu, 24 Jul 2003 06:46:28 +0100 In-Reply-To: <3F1F3685.5040005@btopenworld.com> (Julian Foad's message of "Thu, 24 Jul 2003 02:29:41 +0100") Message-ID: <874r1cpjd7.fsf@codematters.co.uk> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Common Lisp, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Philip Martin Julian Foad writes: > But just to > check, try > > ~> echo 's/[(,]/\n/g' | hexdump -C > 00000000 73 2f 5b 28 2c 5d 2f 5c 6e 2f 67 0a |s/[(,]/\n/g.| $ echo 's/[(,]/\n/g' | hexdump -C 00000000 73 2f 5b 28 2c 5d 2f 5c 6e 2f 67 0a |s/[(,]/\n/g.| 0000000c > Work-arounds: these all work for me; I'd be interested to know which > work for you and which don't. Results below are for sed and tr from the stable Debian distribution. Looking at the package documentation, the sed info pages and faq both cover s/// but are worded slightly differently! > 1. Use "tr" instead of "sed"; unlike sed, its escape sequences are > explicitly listed in its man page: > ~> tr --version | head -1 > tr (textutils) 2.1 > ~> echo 'x(y' | tr '(,' '\n' $ echo 'x(y' | tr '(,' '\n' x y > 2. insert a literal newline character after the backslash, instead > of 'n'; this is explicitly listed in the manual page: > ~> echo 'x(y' | sed 's/[(,]/\ > /g' $ echo 'x(y' | sed 's/[(,]/\ /g' x y > 3. Use numeric escape sequences; these are not mentioned in the > manual but work for me: > ~> echo 'x(y' | sed 's/[(,]/\o012/g' $ echo 'x(y' | sed 's/[(,]/\o012/g' xo012y > ~> echo 'x(y' | sed 's/[(,]/\d010/g' $ echo 'x(y' | sed 's/[(,]/\d010/g' xd010y > ~> echo 'x(y' | sed 's/[(,]/\x0A/g' $ echo 'x(y' | sed 's/[(,]/\x0A/g' xx0Ay > Attached is a version of bash_completion_test using "tr", which I > think is the safest solution. And to keep the patch together, the > original bash_completion.diff is also attached and the log message > is repeated here: Thanks! I checked in a slightly modified version in r6557. -- Philip Martin