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 18896
- From: Philip Martin <philip@xxxxxxxxxxxxxxxxx>
- To: Julian Foad <julianfoad@xxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] bash_completion: improvement, fixes and tests [was: Re: subversion and programmable completion]
- Date: Wed, 23 Jul 2003 22:27:29 +0100
- Cc: dev@xxxxxxxxxxxxxxxxxxxxx, Sebastien Cevey <seb@xxxxxxxxx>, Clint Adams <clint@xxxxxxx>, zsh-workers@xxxxxxxxxx
- In-reply-to: <3F1EE28F.50500@xxxxxxxxxxxxxxx> (Julian Foad's message of "Wed, 23 Jul 2003 20:31:27 +0100")
- Mail-copies-to: never
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20030720162723.GA26506@xxxxxxxxxxxxxxxxxxx> <20030721183359.GA11160@xxxxxxxxx> <3F1EE28F.50500@xxxxxxxxxxxxxxx>
- Sender: Philip Martin <pm@localhost>
Julian Foad <julianfoad@xxxxxxxxxxxxxxx> writes:
> # Print the valid subcommands for "svn", one per line, sorted.
> # Usage: get_svn_subcommands
> get_svn_subcommands() {
> svn help |
> # 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' |
> sort
> }
[...]
> echo "Checking list of subcommands"
> HELP_SUBCMDS=`get_svn_subcommands | tr "\n" " "`
At this point "echo $HELP_SUBCMDS" gives
add cat checkoutnco cleanup commitnci copyncp deletendelnremovenrm diffndi export helpn?nh import info listnls log merge mkdir movenmvnrenamenren propdelnpdel propeditnpeditnpe propgetnpgetnpg proplistnplistnpl propsetnpsetnps resolve revert statusnstatnst switchnsw updatenup
$ sed -V | head -1
GNU sed version 3.02
$ echo 'x(y' | sed 's/[(,]/\n/g'
xny
--
Philip Martin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author