[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] bash_completion: improvement, fixes and tests [was: Re: subversion and programmable completion]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-08-27 05:31:09 CEST

Roman Neuhauser wrote:
> # julianfoad@btopenworld.com / 2003-07-24 02:29:41 +0100:
>
>>Philip Martin wrote:
>>
>>>Julian Foad <julianfoad@btopenworld.com> writes:
>>>> sed -n -e '1,/^Available subcommands:$/d;/^$/q' \
>>>> -e 's/[ )]//g;s/[(,]/\n/g;p' |
>>>
>>>$ 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

What and where is the "SUSv3"?

> 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.

Thank you for this explanation.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 27 13:14:46 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.