From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22117 invoked from network); 23 Jul 2003 21:34:42 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Jul 2003 21:34:42 -0000 Received: (qmail 22884 invoked by alias); 23 Jul 2003 21:34:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18896 Received: (qmail 20274 invoked from network); 23 Jul 2003 21:27:56 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 23 Jul 2003 21:27:56 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.252.24.81] by sunsite.dk (MessageWall 1.0.8) with SMTP; 23 Jul 2003 21:27:56 -0000 Received: from pm by debian2 with local (Exim 3.35 #1 (Debian)) id 19fR90-0000pS-00; Wed, 23 Jul 2003 22:27:30 +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> From: Philip Martin Mail-Copies-To: never Date: Wed, 23 Jul 2003 22:27:29 +0100 In-Reply-To: <3F1EE28F.50500@btopenworld.com> (Julian Foad's message of "Wed, 23 Jul 2003 20:31:27 +0100") Message-ID: <87u19dorwe.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: > # 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