From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 839 invoked from network); 7 Jul 2003 14:46:21 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 7 Jul 2003 14:46:21 -0000 Received: (qmail 17935 invoked by alias); 7 Jul 2003 14:46:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18825 Received: (qmail 17925 invoked from network); 7 Jul 2003 14:46:16 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 7 Jul 2003 14:46:16 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [209.73.233.27] by sunsite.dk (MessageWall 1.0.8) with SMTP; 7 Jul 2003 14:46:15 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 948F970025; Mon, 7 Jul 2003 10:46:14 -0400 (EDT) Date: Mon, 7 Jul 2003 10:46:14 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Subject: third post attempt for _subversion and _debsign Message-ID: <20030707144614.GA21991@acolyte.scowler.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline User-Agent: Mutt/1.5.4i --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Trying from a different address. --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=_subversion #compdef svn svnadmin svnadmin-static=svnadmin _svn () { _arguments -s \ '*::svn command:_svn_command' } _svnadmin () { _arguments -s \ '*::svnadmin command:_svnadmin_command' } (( $+functions[_svn_command] )) || _svn_command () { local cmd if (( ! $+_svn_cmds )); then typeset -gA _svn_cmds _svn_cmds=( ${=${(f)${${"$(svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:} ) fi if (( CURRENT == 1 )); then _tags commands && { compadd "$@" -k _svn_cmds || compadd "$@" ${_svn_cmds} } else local curcontext="$curcontext" cmd="${${(k)_svn_cmds[(R)*:$words[1]:*]}:-${(k)_svn_cmds[(i):$words[1]:]}}" if (( $#cmd )); then curcontext="${curcontext%:*:*}:svn-${cmd}:" _svn_subcommand $cmd else _message "unknown svn command: $words[1]" fi fi } (( $+functions[_svn_subcommand] )) || _svn_subcommand () { local subcmd _svn_subcmds _svn_subcmd_usage _svn_subcmd_usage=${${(M)${(f)"$(svn help $1)"}:#usage:*}#usage: $1 } _svn_subcmds=( ${${=${${${(M)${(f)"$(svn help $1)"##*Valid options:}:#*:*}%% #:*}/ arg/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}[2,-1]} ) [[ "$_svn_subcmd_usage" == *URL* ]] && _svn_subcmds=($_svn_subcmds ":url:_urls") [[ "$_svn_subcmd_usage" == *PATH* ]] && _svn_subcmds=($_svn_subcmds "*:path:_files -/") _arguments \ "$_svn_subcmds[@]" && ret=0 return ret } (( $+functions[_svn_admincommand] )) || _svnadmin_command () { local cmd if (( ! $+_svnadmin_cmds )); then typeset -gA _svnadmin_cmds _svnadmin_cmds=( ${=${(f)${${"$(svnadmin help)"#l#*Available subcommands:}}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:} ) fi if (( CURRENT == 1 )); then _tags commands && { compadd "$@" -k _svnadmin_cmds || compadd "$@" ${(kv)=_svnadmin_cmds} } else local curcontext="$curcontext" cmd="${${(k)_svnadmin_cmds[(R)*:$words[1]:*]}:-${(k)_svnadmin_cmds[(i):$words[1]:]}}" if (( $#cmd )); then curcontext="${curcontext%:*:*}:svnadmin-${cmd}:" _svnadmin_subcommand $cmd else _message "unknown svnadmin command: $words[1]" fi fi } (( $+functions[_svnadmin_subcommand] )) || _svnadmin_subcommand () { local subcmd _svnadmin_subcmds _svnadmin_subcmd_usage _svnadmin_subcmd_usage=${${(M)${(f)"$(svnadmin help $1)"}:#$1: usage:*}#$1: usage: svnadmin $1 } _svnadmin_subcmds=( ${${=${${${(M)${(f)"$(svnadmin help $1)"##*Valid options:}:#*:*}%% #:*}/ arg/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}[2,-1]} ) [[ "$_svnadmin_subcmd_usage" == *REPOS_PATH* ]] && _svnadmin_subcmds=($_svnadmin_subcmds ":path:_files -/") _arguments \ "$_svnadmin_subcmds[@]" && ret=0 return ret } _subversion () { case $service in (svn) _svn "$@" ;; (svnadmin) _svnadmin "$@" ;; esac } _subversion "$@" --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=_debsign #compdef debsign _arguments '-r[copy .changes file from remote host]:[username@]remotehost' \ '-p[program with which to sign]:program name' \ '-m[maintainer]:maintainer name and email address' \ '-e[maintainer]:maintainer name and email address' \ '-k[key ID to use for signing]:keyid' \ '-s[argument style for signing program]:gpg or pgp' \ '-S[Look for source-only .changes file]' \ '-a[architecture]:Debian architecture' \ '-t[GNU system type]:GNU system type' \ '--help[help]' \ '--version[version]' \ '*:changes or dsc file:_files -g "*.(changes|dsc)"' --5mCyUwZo2JvN/JJP--