[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: Roman Neuhauser <dev-null_at_bellavista.cz>
Date: 2003-08-18 11:24:35 CEST

# julianfoad@btopenworld.com / 2003-07-24 02:29:41 +0100:
> Philip Martin wrote:
> >Julian Foad <julianfoad@btopenworld.com> 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@bellavista.cz.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 18 11:25:34 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.