Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] bash_completion: improvement, fixes and tests [was: Re: subversion and programmable completion]
- X-seq: zsh-workers 18945
- From: Roman Neuhauser <dev-null@xxxxxxxxxxxxx>
- To: Julian Foad <julianfoad@xxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] bash_completion: improvement, fixes and tests [was: Re: subversion and programmable completion]
- Date: Mon, 18 Aug 2003 11:24:35 +0200
- Cc: Philip Martin <philip@xxxxxxxxxxxxxxxxx>, dev@xxxxxxxxxxxxxxxxxxxxx, Sebastien Cevey <seb@xxxxxxxxx>, Clint Adams <clint@xxxxxxx>, zsh-workers@xxxxxxxxxx
- In-reply-to: <3F1F3685.5040005@xxxxxxxxxxxxxxx>
- Mail-followup-to: Julian Foad <julianfoad@xxxxxxxxxxxxxxx>, Philip Martin <philip@xxxxxxxxxxxxxxxxx>, dev@xxxxxxxxxxxxxxxxxxxxx, Sebastien Cevey <seb@xxxxxxxxx>, Clint Adams <clint@xxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20030720162723.GA26506@xxxxxxxxxxxxxxxxxxx> <20030721183359.GA11160@xxxxxxxxx> <3F1EE28F.50500@xxxxxxxxxxxxxxx> <87u19dorwe.fsf@xxxxxxxxxxxxxxxxx> <3F1F3685.5040005@xxxxxxxxxxxxxxx>
# julianfoad@xxxxxxxxxxxxxxx / 2003-07-24 02:29:41 +0100:
> Philip Martin wrote:
> >Julian Foad <julianfoad@xxxxxxxxxxxxxxx> writes:
> >
> >> # Find the relevant lines;
> >> # remove brackets and commas; put each word on its own line.
> >> sed -n -e '1,/^Available subcommands:$/d;/^$/q' \
> >> -e 's/[ )]//g;s/[(,]/\n/g;p' |
> >
> >$ sed -V | head -1
> >GNU sed version 3.02
> >$ echo 'x(y' | sed 's/[(,]/\n/g'
> >xny
>
> Oh dear. I don't know why you get that.
because that's what it's supposed to do. read the sed description in
SUSv3. (I'd quote the two paragraphs here but I fear breaking the
ToS...) basically:
* \n is not a valid replacement metacharacter
* behavior of \X where X is not one of &, <digit>, <delimiter> or
<newline> is undefined
* if you want to embed a newline in the replacement, do it this way:
sed 's/BRE/first part\
second part/'
Julian, looks like your sed is broken.
I know I'm coming awfully late, but wanted to make this clear.
--
The From: header's been munged to get rid of unwanted cc's.
My real address: neuhauser@xxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author