about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-11-25 15:28:43 +0000
committerClint Adams <clint@users.sourceforge.net>2005-11-25 15:28:43 +0000
commit4aad4ad3492f003c1cfbbb0fa243cda6c92c30ad (patch)
tree1d6ab513422ee71acb67630205d4148c9cb5470e
parent59e1574eaae5bf95c28eb1f1eb7b9f76b9f4ef5a (diff)
downloadzsh-4aad4ad3492f003c1cfbbb0fa243cda6c92c30ad.tar.gz
zsh-4aad4ad3492f003c1cfbbb0fa243cda6c92c30ad.tar.xz
zsh-4aad4ad3492f003c1cfbbb0fa243cda6c92c30ad.zip
update dput, baz, getconf, gpg, iconv, man, ssh, xmlsoft, gv from HEAD
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Debian/Command/_dput14
-rw-r--r--Completion/Unix/Command/_baz20
-rw-r--r--Completion/Unix/Command/_gpg157
-rw-r--r--Completion/Unix/Command/_iconv2
-rw-r--r--Completion/Unix/Command/_man96
-rw-r--r--Completion/Unix/Command/_ssh341
-rw-r--r--Completion/Unix/Command/_xmlsoft130
-rw-r--r--Completion/X/Command/_gv42
9 files changed, 799 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 87b11a733..0866989b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,12 @@
 	Completion/X/Command/_urxvt: import various completion functions
 	from main branch.
 
+	* unposted: Completion/Debian/Command/_dput,
+	Completion/Unix/Command/_baz, Completion/Unix/Command/_gpg,
+	Completion/Unix/Command/_iconv, Completion/Unix/Command/_man,
+	Completion/Unix/Command/_ssh, Completion/Unix/Command/_xmlsoft,
+	Completion/X/Command/_gv: patch latest versions from main branch.
+
 2005-11-25  Peter Stephenson  <pws@csr.com>
 
 	* 22031: Nikolai Weibull: Completion/Unix/Command/_git: new
diff --git a/Completion/Debian/Command/_dput b/Completion/Debian/Command/_dput
new file mode 100644
index 000000000..664b9b231
--- /dev/null
+++ b/Completion/Debian/Command/_dput
@@ -0,0 +1,14 @@
+#compdef dput
+
+_arguments \
+  '(-c --config)'{-c,--config}'[specify config file]:config file:_files' \
+  '(-d --debug)'{-d,--debug}'[debug mode]' \
+  '(-D --dinstall)'{-D,--dinstall}'[run dinstall after upload]' \
+  '(-f --force)'{-f,--force}'[force upload of already uploaded package]' \
+  '(-l --lintian)'{-l,--lintian}'[run lintian before upload]' \
+  '(-o --check-only)'{-o,--check-only}'[check the package, do not upload]' \
+  '(-p --print)'{-p,--print}'[print configuration]' \
+  '(-s --simulate)'{-s,--simulate}'[simulate an upload only]' \
+  '(-u --unchecked)'{-u,--unchecked}'[do not check GPG signature on the changes file]' \
+  '(-v --version)'{-v,--version}'[show version information]' \
+  '*:changes file:_files -g "*.changes(-.)"'
diff --git a/Completion/Unix/Command/_baz b/Completion/Unix/Command/_baz
index a15596488..5fbec44b2 100644
--- a/Completion/Unix/Command/_baz
+++ b/Completion/Unix/Command/_baz
@@ -54,8 +54,12 @@ _baz_config () {
   [[ -n "$n" ]] && configdir=$opt_args[$n]
   root="$(_call_program baz $BAZ tree-root ${configdir} 2>&1)"
   if (( $? )); then
-    _message -e messages "Error: $root"
-    return $ret
+    if [[ -d "configs" ]]; then
+      root=.
+    else
+      _message -e messages "Error: $root"
+      return $ret
+    fi
   fi
 
   if [[ -d "$root/configs" ]]; then
@@ -184,14 +188,14 @@ cmd_whereis_archive=(':archive:_baz_archives')
 local cmd_init_tree
 cmd_init_tree=('::version:_baz_versions')
 
+local cmd_tree_id
+cmd_tree_id=('::directory:_files -/')
+
 local cmd_tree_root
 cmd_tree_root=('::directory:_files -/')
 
 local cmd_tree_version
-cmd_tree_version=('::directory:_files -/')
-
-local cmd_set_tree_version
-cmd_set_tree_version=(':version:_baz_versions')
+cmd_tree_version=(':version:_baz_versions')
 
 local cmd_build_config cmd_buildcfg
 cmd_build_config=(':config:_baz_config')
@@ -217,7 +221,7 @@ cmd_inventory=('::separator:(--)' '*:directory:_files -/')
 cmd_srcfind=($cmd_inventory)
 
 local cmd_lint
-cmd__lint=('::directory:_files -/')
+cmd_lint=('::directory:_files -/')
 
 local cmd_id cmd_invtag
 cmd_id=('*:file:_files')
@@ -300,7 +304,7 @@ cmd_import=('::version:_baz_versions')
 cmd_imprev=($cmd_import)
 
 local cmd_commit cmd_cmtrev
-cmd_commit=('::version:_baz_versions' ':separator:(--)' '*:files:_files')
+cmd_commit=('*:files:_files')
 cmd_cmtrev=($cmd_commit)
 
 local cmd_get cmd_getrev
diff --git a/Completion/Unix/Command/_gpg b/Completion/Unix/Command/_gpg
new file mode 100644
index 000000000..04b6f714c
--- /dev/null
+++ b/Completion/Unix/Command/_gpg
@@ -0,0 +1,157 @@
+#compdef gpg gpgv
+
+local curcontext="$curcontext" state line expl ret=1
+typeset -A opt_args
+
+_arguments -C -s -S -A "-*" \
+  '(-s --sign)'{-s,--sign}'[make a signature]' \
+  '--clearsign[make a clear text signature]' \
+  '(-b --detach-sign)'{-b,--detach-sign}'[make a detached signature]' \
+  '(-e --encrypt)'{-e,--encrypt}'[encrypt data. this option may be combined  with --sign]' \
+  '(-c --symmetric)'{-c,--symmetric}'[encrypt with symmetric cypher only]' \
+  '--store[store only]' \
+  '--decrypt[decrypt file or stdin]' \
+  '--verify[verify a signature]:file attachment:_files' \
+  '--verify-files[verify a list of files]:_files attachment_files' \
+  '(-f --encrypt-files)'{-f,--encrypt-files}'[encrypt files]' \
+  '--decrypt-files[decrypt files]' \
+  '--list-keys[list all keys]' \
+  '--list-public-keys[list all public keys]' \
+  '--list-secret-keys[list all secret keys]' \
+  '--list-sigs[lists keys and signatures]:key attachment:->public-keys' \
+  '--check-sigs[lists key, signatures and check them]:key attachment:->public-keys' \
+  '--fingerprint[list all keys with their fingerprints]:key attachment:->public-keys' \
+  '--list-packets[list only the sequence of packets]' \
+  '--gen-key[generate a new pair key]' \
+  '--edit-key[a menu for edit yours keys]:key attachment:->public-keys' \
+  '--sign-key[sign a key]:key attachment:->public-keys'\
+  '--lsign-key[sign a key but mark as non-exportable]:key attachment:->public-keys' \
+  '--nrsign-key[sign a key non-revocably]' \
+  '--delete-key[remove key from public keyring]:key attachment:->public-keys' \
+  '--delete-secret-key[remove key from public & private keyring]:key attachment:->secret-keys' \
+  '--delete-secret-and-public-key:key attachment:->secret-keys' \
+  '--gen-revoke[generate a revocation certificate]' \
+  '--desig-revoke[generate a designated revocation certificate]' \
+  '--export[export all key from all keyrings]' \
+  '--send-keys[send keys to a keyserver]:key attachment:->public-keys' \
+  '--export-all[export all key and not OpenPGP compatible keys]' \
+  '--export-secret-keys:key attachment:->secret-keys' \
+  '--export-secret-subkeys:key attachment:->secret-keys' \
+  '--import[import a gpg key from a file]:_files attachment:_files' \
+  '--fast-import[import a file without build trustdb]:_files attachment:_files' \
+  '--recv-keys[receive a list of keys from a keyserver]:key attachment:->public-keys' \
+  '--refresh-keys[update all keys from a keyserver]' \
+  '--search-keys[search for keys on a key server]' \
+  '--update-trustdb[update the trust database]' \
+  '--check-trustdb[unattended trust database update]' \
+  '--fix-trustdb[fix a corrupted trust database]' \
+  '--export-ownertrust[list the assigned ownertrust values in ASCII format]:file:_files' \
+  '--import-ownertrust[update the trustdb with a file]:file:_files' \
+  '--dearmor[de-Armor a file or stdin]' \
+  '--enarmor[en-Armor a file or stdin]' \
+  '--print-md[print message digests]:algorithm:->ciphers::file:_files' \
+  '--print-mds[print message digests]::file:_files' \
+  '--gen-random:count' --gen-prime \
+  '--version[print info on program version and supported algorithms]' \
+  '--warranty[print warranty info]' \
+  '(-h --help)'{-h,--help}'[display usage information]' \
+  '(-a --armor)'{-a,--armor}'[create ASCII armored output]' \
+  '(-o --output)'{-o+,--output}'[write output to file]:output file:_files' \
+  '(-u --local-user)'{-u+,--local-user}'[use name as the user ID to sign]:user attachment:_users'\
+  '--default-key[specify default user-id for signatures]:key:->secret-keys' \
+  '*'{-r+,--recipient}'[specify user to encrypt for]:recipient:->public-keys' \
+  '--default-recipient[specify default recipient]:recipient:->public-keys' \
+  '--default-recipient-self[use default key as default recipient]' \
+  '--no-default-recipient[reset default recipient]' \
+  '*--encrypt-to[specify recipient]:->public-keys' \
+  '(--encrypt-to)--no-encrypt-to[disable the use of all --encrypt-to keys]' \
+  '(-q --quiet)*'{-v,--verbose}'[increase amount of output]' \
+  '(-q --quiet -v --verbose)'{-q,--quiet}'[reduce amount of output]' \
+  '(-z --compress)'{-z,--compress}'[specify compression level]:compression level:((0\:no\ compression 1\:minimum 2 3 4 5 6\:default 7 8 9\:maximum))' \
+  '(-t --textmode)'{-t,--textmode}'[use canonical text mode]' \
+  '(-n --dry-run)'{-n,--dry-run}"[don't make any changes]" \
+  '(-i --interactive --batch)'{-i,--interactive}'[prompt before overwriting files]' \
+  '(-i --interactive --no-batch)--batch[use batch mode]' \
+  '--no-tty[never output to tty]' \
+  '(--batch)--no-batch[disable batch mode]' \
+  '(--no)--yes[assume "yes" on most questions]' \
+  '(--yes)--no[assume "no" on most questions]' \
+  '--default-cert-check-level:check level:((0\:no\ claim 1\:no\ verification 2\:casual\ verification 3\:extensive\ verification))' \
+  '--trusted-key[assume that the specified key is trustworthy]:long key id' \
+  '--always-trust[skip key validation]' \
+  '--keyserver[specify key server to use]:key server:_hosts' \
+  '--keyserver-options[specify keyserver options]:options' \
+  '--import-options[specify options for importing keys]:options' \
+  '--export-options[specify options for exporting keys]:options' \
+  --show-photos --no-show-photos '--photo-viewer:command:_command_names -e'\
+  --exec-path:path:_dir_list' \
+  --show-keyring[display keyring name when listing keys]' \
+  '--keyring=[add specified file to list of keyrings]:file:_files' \
+  '--secret-keyring[add specified file to list of secret keyrings]:file:_files' \
+  --homedir:directory:_directories \
+  '--charset:character set:(iso-8859-1 iso-8859-2 koi8-r utf-8)' \
+  '--utf8-strings' '--no-utf8-strings[arguments are not in UTF8]' \
+  '(--no-options)--options[specify file to read options from]:options file:_files' \
+  "(--options)--no-options[don't read options file]" \
+  --{status,logger,attribute,passphrase,command}-fd:file\ descriptor:_file_descriptors \
+  '--sk-comments[include secret key comments when exporting keys]' \
+  '(--emit-version)--no-version[omit version string in clear text signatures]' \
+  '(--no-version)--emit-version[force writing of version string in clear text signatures]' \
+  '(-N --notation-data)'{-N,--notation-data}'[put parameter in signature]:name=value' \
+  '(--no-show-notation)--show-notation[show key signature notations]' \
+  "(--show-notation)--no-show-notation[don't show key signature notations]" \
+  '--set-policy-url:policy URL' \
+  '(--no-show-policy-url)--show-policy-url' \
+  "(--show-policy-url)--no-show-policy-url" \
+  '--set-filename[specify file which is stored in messages]:file:_files' \
+  '(--for-your-eyes-only)--for-your-eyes-only' \
+  "(--for-your-eyes-only)--no-for-your-eyes-only" \
+  --completes-needed:number --marginals-needed:number --max-cert-depth:number \
+  --{{,disable-,s2k-}cipher,{,s2k-,cert-}digest,disable-pubkey}'-algo:cipher:->ciphers' \
+  --s2k-mode:value --simple-sk-checksum \
+  '--compress-algo:compression algorithm:((0\:disable\ compression 1\:zlib 2\:rfc1950))' \
+  --no-sig-cache --no-sig-create-check --{,no-}auto-check-trustdb --throw-keyid \
+  --not-dash-escaped --escape-from-lines --use-agent \
+  --rfc1991 --{,no-}pgp2 --{,no}pgp6 --{,no}pgp7 --openpgp \
+  --{,no-}force-v3-sigs --{,no}force-v4-certs --force-mdc --disable-mdc \
+  --{,no-}allow-non-selfsigned-uid --allow-freeform-uid \
+  --ignore-time-conflict --ignore-valid-from \
+  --ignore-crc-error --ignore-mdc-error --lock-once --lock-multiple --lock-never \
+  --no-random-seed-file --no-verbose --no-greeting --no-secmem-warning \
+  --no-permission-warning --no-mdc-warning --no-armor --no-default-keyring \
+  --skip-verify --with-colons --with-key-data --with-fingerprint \
+  --fast-list-mode --fixed-list-mode --list-only --no-literal --set-filesize \
+  --emulate-md-encode-bug --show-session-key --override-session-key:string \
+  --{,no-}ask-sig-expire --{,no}ask-cert-expire --{,no}expert \
+  --merge-only --allow-secret-key-import --try-all-secrets \
+  --enable-special-filenames --no-expensive-trust-checks --group:name=value \
+  --preserve-permissions --personal-{cipher,digest,compress}-preferences:string \
+  --default-preference-list:string \
+  '*:args:->args' && ret=0
+
+if [[ $state = args ]]; then
+  if (( ${+opt_args[--export]} || ${+opt_args[--list-keys]} )); then
+    state=public-keys
+  elif (( ${+opt_args[--list-secret-keys]} )); then
+    state=secret-keys
+  else
+    _files && return
+  fi
+fi
+
+case "$state" in
+  public-keys)
+    _wanted public-keys expl 'public key' \
+	compadd ${${(Mo)$(_call_program public-keys gpg --list-keys 2>/dev/null):%<*>}//(<|>)/} && return
+  ;;
+  secret-keys)
+    _wanted secret-keys expl 'secret key' compadd \
+	${${(Mo)$(_call_program secret-keys gpg --list-secret-keys 2>/dev/null):%<*>}//(<|>)/} && return
+  ;;
+  ciphers)
+    _wanted ciphers expl cipher compadd \
+        ${${(s.,.)${(M)${(f)"$(_call_program ciphers gpg --version)"}:#Cipher*}#*:}# } && return
+  ;;
+esac
+
+return ret
diff --git a/Completion/Unix/Command/_iconv b/Completion/Unix/Command/_iconv
index 92fa17e34..2cd69b21a 100644
--- a/Completion/Unix/Command/_iconv
+++ b/Completion/Unix/Command/_iconv
@@ -26,7 +26,7 @@ if _pick_variant gnu=GNU unix --version; then
     else
       _wanted codesets expl 'code set' compadd "$@" \
 	  -M 'm:{a-zA-Z}={A-Za-z} r:|-=* r:|=*' \
-	  ${${${(f)"$(_call_program codesets iconv --list|sed -n '/^$/,$ p')"}## #}%//} && ret=0
+	  ${${${(f)"$(_call_program codesets iconv --list)"}## #}%//} && ret=0
     fi
   fi
 
diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man
new file mode 100644
index 000000000..4b7669010
--- /dev/null
+++ b/Completion/Unix/Command/_man
@@ -0,0 +1,96 @@
+#compdef man apropos whatis
+
+_man() {
+  local dirs expl mrd awk
+
+  if [[ $service == man ]] && (( $words[(I)-l] + $words[(I)--local-file] )); then
+    _files || return 0
+  fi
+
+  if (( ! $#_manpath )); then
+    local mp
+    mp=( ${(s.:.)$(manpath 2>/dev/null)} )
+    [[ "$mp" == *:* ]] && mp=( ${(s.:.)mp} )
+    if (( $#mp )); then
+      _manpath=( $mp )
+    elif (( $#manpath )); then
+      _manpath=( $manpath )
+    fi
+  fi
+
+  (( $#_manpath )) ||
+      _manpath=( /usr/man(-/) /(opt|usr)/(dt|share|X11R6|local)/(cat|)man(-/) )
+
+  # `sman' is the SGML manual directory for Solaris 7.
+  # 1M is system administrator commands on SVR4
+
+  mrd=(${^_manpath/\%L/${LANG:-En_US.ASCII}}/mandb(N))
+
+  local sect
+  if [[ $OSTYPE = solaris* ]]; then
+    sect=$words[$words[(i)-s]+1]
+  elif [[ -n ${sect:=$words[$words[(i)-S]+1]} || -n ${sect:=$MANSECT} ]]; then
+    if [[ $sect != ${sect::="${sect//:/|}"} ]]; then
+      sect="($sect)"
+    fi
+  elif (( CURRENT > 2 )); then
+    sect=$words[2]
+  fi
+
+  if [[ $sect = (<->*|1M|l|n) || $sect = \(*\|*\) ]]; then
+    dirs=( $^_manpath/(sman|man|cat)${~sect}/ )
+    awk="\$2 == \"$sect\" {print \$1}"
+  else
+    dirs=( $^_manpath/(sman|man|cat)*/ )
+    awk='{print $1}'
+  fi
+  if zstyle -t ":completion:${curcontext}:manuals" separate-sections; then
+    typeset -U sects
+    local ret=1
+
+    sects=( ${(o)${dirs##*(man|cat)}%/} )
+
+    (( $#sects )) || return 1
+
+    _tags manuals.${^sects}
+    while _tags; do
+      for sect in $sects; do
+        _requested manuals.$sect expl "manual page, section $sect" _man_pages &&
+            ret=0
+      done
+      (( ret )) || return 0
+    done
+
+    return 1
+  else
+    sect=
+    _wanted manuals expl 'manual page' _man_pages
+  fi
+}
+
+_man_pages() {
+  local matcher pages dummy
+
+  zparseopts -E M+:=matcher
+
+  if (( $#matcher )); then
+    matcher=( ${matcher:#-M} )
+    matcher="$matcher"
+  else
+    matcher=
+  fi
+
+  pages=( ${(M)dirs:#*$sect/} )
+  compfiles -p pages '' '' "$matcher" '' dummy '*'
+  pages=( ${^~pages}(N:t) )
+
+  (($#mrd)) && pages[$#pages+1]=($(awk $awk $mrd))
+
+  # Remove any compression suffix, then remove the minimum possible string
+  # beginning with .<->: that handles problem cases like files called
+  # `POSIX.1.5'.
+
+  compadd "$@" - ${pages%.(?|<->*(|.gz|.bz2|.Z))}
+}
+
+_man "$@"
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
new file mode 100644
index 000000000..bf695c4e2
--- /dev/null
+++ b/Completion/Unix/Command/_ssh
@@ -0,0 +1,341 @@
+#compdef ssh slogin=ssh scp ssh-add ssh-agent ssh-keygen sftp
+
+_remote_files () {
+  # There should be coloring based on all the different ls -F classifiers.
+  local expl rempat remfiles remdispf remdispd args suf ret=1
+
+  if zstyle -T ":completion:${curcontext}:files" remote-access; then
+    zparseopts -D -E -a args p: 1 2 4 6 F:
+    if [[ -z $QIPREFIX ]]
+    then rempat="${PREFIX%%[^./][^/]#}\*"
+    else rempat="${(q)PREFIX%%[^./][^/]#}\*"
+    fi
+    remfiles=(${(M)${(f)"$(_call_program files ssh $args -a -x ${IPREFIX%:} ls -d1FL "$rempat" 2>/dev/null)"}%%[^/]#(|/)})
+    compset -P '*/'
+    compset -S '/*' || suf='remote file'
+
+    remdispf=(${remfiles:#*/})
+    remdispd=(${(M)remfiles:#*/})
+
+    _tags files
+    while _tags; do
+      while _next_label files expl ${suf:-remote directory}; do
+        [[ -n $suf ]] && compadd "$@" "$expl[@]" -d remdispf \
+	    ${(q)remdispf%[*=@|]} && ret=0 
+	compadd ${suf:+-S/} "$@" "$expl[@]" -d remdispd \
+	    ${(q)remdispd%/} && ret=0
+      done
+      (( ret )) || return 0
+    done
+    return ret
+  else
+    _message -e remote-files 'remote file'
+  fi
+}
+
+_ssh () {
+  local curcontext="$curcontext" state line expl common tmp cmds suf ret=1
+  typeset -A opt_args
+
+  common=(
+    '-c+[select encryption cipher]:encryption cipher:(idea des 3des blowfish arcfour tss none)'
+    '-C[compress data]'
+    '-F+[specify alternate config file]:config file:_files'
+    '-i+[select identity file]:SSH identity file:_files'
+    '*-o+[specify extra options]:option string:->option'
+    '(-2)-1[forces ssh to try protocol version 1 only]'
+    '(-1)-2[forces ssh to try protocol version 2 only]'
+    '(-6)-4[forces ssh to use IPv4 addresses only]'
+    '(-4)-6[forces ssh to use IPv6 addresses only]'
+  )
+
+  case "$service" in
+  ssh)
+    _arguments -C -s \
+      '(-A)-a[disable forwarding of authentication agent connection]' \
+      '(-a)-A[enables forwarding of the authentication agent connection]' \
+      '(-P)-b+[specify interface to transmit on]:bind address' \
+      '-D+[specify a dynamic port forwarding]:port' \
+      '-e+[set escape character]:escape character (or `none'"'"'):' \
+      '(-n)-f[go to background]' \
+      '-g[allow remote hosts to connect to local forwarded ports]' \
+      '-I+[specify smartcard device]:device:_files' \
+      '-k[disable forwarding of kerberos tickets]' \
+      '-l+[specify login name]:login name:_ssh_users' \
+      '(-1)-m+[specify mac algorithms]:mac spec' \
+      '-n[redirect stdin from /dev/null]' \
+      '(-1)-N[do not execute a remote command. (protocol version 2 only)]' \
+      '-p+[specify port on remote host]:port number on remote host' \
+      '-P[use non privileged port]' \
+      '(-v)*-q[quiet operation]' \
+      '(-1)-s[invoke subsystem]' \
+      '(-T)-t[force pseudo-tty allocation]' \
+      '(-1 -t)-T[disable pseudo-tty allocation (protocol version 2 only)]' \
+      '(-q)*-v[verbose mode]' \
+      '-V[show version number]' \
+      '(-X)-x[disable X11 forwarding]' \
+      '(-x)-X[enable X11 forwarding]' \
+      '*-L[specify local port forwarding]:local port forwarding:->forward' \
+      '*-R[specify remote port forwarding]:remote port forwarding:->forward' \
+      ':remote host name:->userhost' \
+      '*::args:->command' "$common[@]" && ret=0
+    ;;
+  scp)
+    _arguments -C -s \
+      '-p[preserve modification times]' \
+      '-r[recursively copy directories]' \
+      '-v[verbose mode]' \
+      '-B[batch mode]' \
+      '-q[disables the progress meter]' \
+      '-P+[specify port on remote host]:port number on remote host' \
+      '-S+[specify ssh program]:path to ssh:_command_names -e' \
+      '*:file:->file' "$common[@]" && ret=0
+    ;;
+  ssh-add)
+    _arguments -s \
+      '-l[list all identities]' \
+      '-L[lists public key parameters of all identities in the agent]'\
+      '-d[remove identity]' \
+      '-D[delete all identities]' \
+      '-p[read passphrase from stdin]' \
+      '*:SSH identity file:_files'
+    return
+    ;;
+  ssh-agent)
+    _arguments -s \
+      '(*)-k[kill agent automatically]' \
+      '(-c)-s[force sh-style shell]' \
+      '(-s)-c[force csh-style shell]' \
+      '(-k)-d[debug mode]' \
+      '*::command: _normal'
+    return
+    ;;
+  ssh-keygen)
+    cmds=( -p -i -e -y -c -l -B -D -U )
+    _arguments \
+      '-q[silence ssh-keygen]' \
+      "($cmds -P)-b[specify number of bits in key]:bits in key" \
+      "($cmds -P)-t[specify the type of the key to create]:key type:(rsa1 rsa dsa)" \
+      "(${cmds#-p })-N[provide new passphrase]:new passphrase" \
+      "($cmds -b -t)-C[provide new comment]:new comment" \
+      '(-D)-f[key file]:key file:_files' \
+      '('${(j. .)cmds:#-[pc]}' -t -b)-P[provide old passphrase]:old passphrase' \
+      "($cmds -q -b -t -C)-p[change passphrase of private key file]" \
+      "($cmds -q -b -t -N -C -P)-i[import key to OpenSSH format]" \
+      "($cmds -q -b -t -N -C -P)-e[export key to SECSH file format]" \
+      "($cmds -q -b -t -N -C -P)-y[get public key from private key]" \
+      "($cmds -q -b -t -N)-c[change comment in private and public key files]" \
+      "($cmds -q -b -t -N -C -P)-l[show fingerprint of key file]" \
+      "($cmds -q -b -t -N -C -P)-B[show the bubblebabble digest of key]" \
+      "($cmds -q -b -t -N -C -P -f)-D[download key stored in smartcard reader]:reader" \
+      "($cmds -q -b -t -N -C -P)-U[upload key to smartcard reader]:reader"
+    return
+    ;;
+  sftp)
+    _arguments -C -s \
+      '-C[compress data]' \
+      '-F+[specify alternate config file]:config file:_files' \
+      '(-1)-s[invoke subsystem]' \
+      '-S+[specify program]:program:_command_names -e' \
+      '-B+[specify buffer size]:buffer size' \
+      '-b+[specify batch file to read]:batch file:_files' \
+      '*-v[verbose mode]' \
+      '-1[forces ssh to try protocol version 1 only]' \
+      '*-o+[specify extra options]:option string:->option' \
+      '1:file:->rfile' '*:file:->file' && ret=0
+    ;;
+  esac
+
+  while [[ -n "$state" ]]; do
+    lstate="$state"
+    state=''
+
+    case "$lstate" in
+    option)
+      if compset -P '*[= ]'; then
+        case "$IPREFIX" in
+        *(#i)(afstokenpassing|batchmode|compression|fallbacktorsh|forward(agent|x11)|keepalive|passwordauthentication|rhosts(|rsa)authentication|rsaauthentication|usersh|kerberos(authetication|tgtparsing)|useprivileged)*)
+	  _wanted values expl 'truth value' compadd yes no && ret=0
+          ;;
+        *(#i)ciphers*)
+          _values -s , 'encryption cipher' \
+	      'aes128-cbc' \
+	      '3des-cbc' \
+	      'blowfish-cbc' \
+	      'cast128-cbc' \
+	      'arcfour' \
+	      'aes192-cbc' \
+	      'aes256-cbc' \
+	      'rijndael128-cbc' \
+	      'rijndael192-cbc' \
+	      'rijndael256-cbc' \
+	      'rijndael-cbc@lysator.liu.se' && ret=0
+          ;;
+        *(#i)cipher*)
+	  _wanted values expl 'encryption cipher' \
+              compadd idea des 3des blowfish arcfour tss none && ret=0
+          ;;
+        *(#i)globalknownhostsfile*)
+          _description files expl 'global file with known hosts'
+          _files "$expl[@]" && ret=0
+          ;;
+        *(#i)hostname*)
+	  _wanted hosts expl 'real host name to log into' _ssh_hosts && ret=0
+          ;;
+        *(#i)identityfile*)
+          _description files expl 'SSH identity file'
+          _files "$expl[@]" && ret=0
+          ;;
+        *(#i)(local|remote)forward*)
+          state=forward
+          ;;
+        *(#i)protocol*)
+          _values -s , 'protocol version' \
+	      '1' \
+	      '2' && ret=0
+	  ;;
+        *(#i)proxycommand*)
+          compset -q
+          shift 1 words
+          (( CURRENT-- ))
+          _normal && ret=0
+          ;;
+        *(#i)stricthostkeychecking*)
+          _wanted values expl 'checking type' compadd yes no ask && ret=0
+          ;;
+        *(#i)userknownhostsfile*)
+          _description files expl 'user file with known hosts'
+          _files "$expl[@]" && ret=0
+          ;;
+        *(#i)user*)
+	  _wanted users expl 'user to log in as' _ssh_users && ret=0
+          ;;
+        *(#i)xauthlocation*)
+          _description files expl 'xauth program'
+          _files "$expl[@]" -g '*(-*)' && ret=0
+          ;;
+        esac
+      else
+        _wanted values expl 'configure file option' \
+            compadd -M 'm:{a-z}={A-Z}' -S '=' - \
+	    	AddressFamily \
+                AFSTokenPassing BatchMode BindAddress \
+		ChallengeResponseAuthentication CheckHostIP \
+		Cipher Ciphers ClearAllForwardings Compression \
+                CompressionLevel ConnectionAttempts ConnectTimeout \
+		DynamicForward EnableSSHKeysign \
+		EscapeChar FallBackToRsh ForwardAgent ForwardX11 \
+		ForwardX11Trusted \
+                GatewayPorts GlobalKnownHostsFile GSSAPIAuthentication \
+		GSSAPIDelegateCredentials HostbasedAuthentication \
+		HostKeyAlgorithms HostKeyAlias HostName IdentityFile \
+		IdentitiesOnly \
+		KeepAlive KerberosAuthentication KerberosTgtPassing \
+		LocalForward LogLevel MACs NoHostAuthenticationForLocalhost \
+		NumberOfPasswordPrompts PreferredAuthentications \
+		PasswordAuthentication Port Protocol ProtocolKeepAlives \
+                ProxyCommand PubkeyAuthentication RemoteForward \
+		RhostsAuthentication RhostsRSAAuthentication \
+		RSAAuthentication ServerAliveInterval ServerAliveCountMax \
+		SetupTimeOut SmartcardDevice StrictHostKeyChecking \
+		TCPKeepAlive \
+                UsePrivilegedPort User UserKnownHostsFile UseRsh \
+                VerifyHostKeyDNS XAuthLocation && ret=0
+      fi
+      ;;
+    forward)
+      if compset -P 1 '*:'; then
+        if compset -P '*:'; then
+          _message -e port-numbers 'port number'
+        else
+	  _wanted hosts expl host _ssh_hosts -qS:
+        fi
+      else
+        _message -e port-numbers 'listen-port number'
+      fi
+      return
+      ;;
+    command)
+      shift 1 words
+      (( CURRENT-- ))
+      _normal
+      return
+      ;;
+    userhost)
+      if compset -P '*@'; then
+	_wanted hosts expl 'remote host name' _ssh_hosts && ret=0
+      elif compset -S '@*'; then
+        _wanted users expl 'login name' _ssh_users -S '' && ret=0
+      else
+        if (( $+opt_args[-l] )); then
+	  tmp=()
+	else
+	  tmp=( 'users:login name:_ssh_users -qS@' )
+	fi
+	_alternative \
+	    'hosts:remote host name:_ssh_hosts' \
+	    "$tmp[@]" && ret=0
+      fi
+      ;;
+    file)
+      if compset -P '*:'; then
+        _remote_files ${(kv)~opt_args[(I)-[FP1246]]/-P/-p} && ret=0
+      elif compset -P '*@'; then
+        suf=( -S '' )
+        compset -S ':*' || suf=( -S : )
+        _wanted hosts expl 'remote host name' _ssh_hosts $suf && ret=0
+      else
+        _alternative \
+	    'files:: _files' \
+	    'hosts:remote host name:_ssh_hosts -S:' \
+	    'users:user:_ssh_users -qS@' && ret=0
+      fi
+      ;;
+    rfile)
+      if compset -P '*:'; then
+        _remote_files && ret=0
+      elif compset -P '*@'; then
+        _wanted hosts expl host _ssh_hosts -S: && ret=0
+      else
+        _alternative \
+	    'hosts:remote host name:_ssh_hosts -S:' \
+	    'users:user:_ssh_users -qS@' && ret=0
+      fi
+      ;;
+    esac
+  done
+}
+
+_ssh_users () {
+  _combination -s '[:@]' my-accounts users-hosts users "$@"
+}
+
+_ssh_hosts () {
+  local -a config_hosts
+
+  if [[ "$IPREFIX" == *@ ]]; then
+    _combination -s '[:@]' my-accounts users-hosts "users=${IPREFIX/@}" hosts "$@"
+  else
+    _combination -s '[:@]' my-accounts users-hosts \
+      ${opt_args[-l]:+"users=${opt_args[-l]:q}"} hosts "$@"
+  fi
+  if [[ -r "$HOME/.ssh/config" ]]; then
+    local IFS=$'\t ' key hosts host
+    while read key hosts; do
+      if [[ "$key" == (#i)host ]]; then
+	 for host in ${(z)hosts}; do
+	    case $host in
+	    (*[*?]*) ;;
+	    (*) config_hosts+=("$host") ;;
+	    esac
+	 done
+      fi
+    done < "$HOME/.ssh/config"
+    if (( ${#config_hosts} )); then
+      _wanted hosts expl 'remote host name' \
+	compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" $config_hosts
+    fi
+  fi
+}
+
+_ssh "$@"
diff --git a/Completion/Unix/Command/_xmlsoft b/Completion/Unix/Command/_xmlsoft
new file mode 100644
index 000000000..6baecf57b
--- /dev/null
+++ b/Completion/Unix/Command/_xmlsoft
@@ -0,0 +1,130 @@
+#compdef xsltproc xmllint -value-,XML_CATALOG_FILES,-default-
+
+# xmllint: using libxml version 20622
+# xsltproc: using libxslt version 10100
+
+case $service in
+  xsltproc)
+    _arguments \
+      '(-)'{--version,-V}'[show libxml and libxslt versions]' \
+      '(--verbose -v)'{--verbose,-v}"[show logs of what's happening]" \
+      '(--output -o)'{--output,-o}'[specify output file]:output file:_files' \
+      '--timing[display the time used]' \
+      '--repeat[run the transformation 20 times]' \
+      '--debug[dump the tree of the result instead]' \
+      '--dumpextensions[dump registered extension elements and functions]' \
+      '--novalid[skip the DTD loading phase]' \
+      '--noout[do not dump the result]' \
+      '--maxdepth[increase the maximum depth]:depth' \
+      '--maxparsedepth[increase the maximum parser depth]:depth' \
+      '--html[input document is an HTML file]' \
+      '--param[pass a parameter,value pair]:name::value (xpath expression)' \
+      '--stringparam[pass a parameter]:name::value' \
+      '--path[provide a set of paths for resources]:paths:_files -/' \
+      '--nonet[refuse to fetch DTDs or entities over network]' \
+      '--nowrite[refuse to write to any file or resource]' \
+      '--nomkdir[refuse to create directories]' \
+      '--writesubtree[allow file write only with the path subtree]:path:_files -/' \
+      '--catalogs[use SGML catalogs]' \
+      '--xinclude[do XInclude processing on document input]' \
+      '--load-trace[print trace of all external entites loaded]' \
+      {--profile,--norman}'[dump profiling information]' \
+      '1:stylesheet:_files -g "*.xsl(-.)"' \
+      ':file:_files -g "*.xml(-.)"' && return
+  ;;
+  xmllint)
+    local -a encoding
+
+    encoding=(
+      UTF-8
+      UTF-16
+      ISO-10646-UCS-2
+      ISO-10646-UCS-4
+      ISO-8859-1
+      ISO-8859-2
+      ISO-8859-3
+      ISO-8859-4
+      ISO-8859-5
+      ISO-8859-6
+      ISO-8859-7
+      ISO-8859-8
+      ISO-8859-9
+      ISO-2022-JP
+      SHIFT_JIS
+      EUC-JP
+    )
+
+    _arguments \
+      '--version[display the version of the XML library used]' \
+      '--debug[dump a debug tree of the in-memory document]' \
+      '--shell[run a navigating shell]' \
+      '--debugent[debug the entities defined in the document]' \
+      '--copy[used to test the internal copy implementation]' \
+      '--recover[output what was parsable on broken XML documents]' \
+      '--noent[substitute entity references by their value]' \
+      "(--output -o)--noout[don't output the result tree]" \
+      '--path[provide a set of paths for resources]:paths:_files -/' \
+      '--load-trace[print trace of all external entites loaded]' \
+      '--nonet[refuse to fetch DTDs or entities over network]' \
+      '--htmlout[output results as HTML]' \
+      '--nowrap[do not put HTML doc wrapper]' \
+      '--nocompact[do not generate compact text nodes]' \
+      '--valid[validate the document in addition to std well-formed check]' \
+      '(--dtdvalid --relaxng --schema)--postvalid[do a posteriori validation, i.e after parsing]' \
+      '(--postvalid --relaxng --schema --dtdvalidfpi)--dtdvalid[do a posteriori validation against a given DTD]:DTD:_webbrowser' \
+      '(--postvalid --relaxng --schema --dtdvalid)--dtdvalidfpi[as --dtdvalid but specify DTD with public identifier]:DTD identifier' \
+      '--timing[print some timings]' \
+      '(--noout --output -o)'{--output,-o}'[save to a given file]:output file:_files' \
+      '--repeat[repeat 100 times, for timing or profiling]' \
+      '--insert[ad-hoc test for valid insertions]' \
+      '--compress[turn on gzip compression of output]' \
+      '--html[use the HTML parser]' \
+      '--xmlout[use the XML serializer when using --html]' \
+      '--push[use the push mode of the parser]' \
+      '--memory[parse from memory]' \
+      '--maxmem[imits memory allocation]:bytes' \
+      '--nowarning[do not emit warnings from parser/validator]' \
+      '--noblanks[drop (ignorable?) blanks spaces]' \
+      '--nocdata[replace cdata section with text nodes]' \
+      '--format[reformat/reindent the input]' \
+      '--encode[output in the given encoding]:encoding:(${encoding[@]})' \
+      '--dropdtd[remove the DOCTYPE of the input docs]' \
+      '--c14n[save in W3C canonical format]' \
+      '--exc-c14n[save in W3C exclusive canonical format]' \
+      '--nsclean[remove redundant namespace declarations]' \
+      '--testIO[test user I/O support]' \
+      '(--nocatalogs)--catalogs[use SGML catalogs]' \
+      '(--catalogs)--nocatalogs[deactivate all catalogs]' \
+      '--auto[generate a small doc on the fly]' \
+      '(--noxincludenode)--xinclude[do XInclude processing]' \
+      '(--xinclude)--noxincludenode[do XInclude processing but do not generate XInclude nodes]' \
+      '--loaddtd[fetch external DTD]' \
+      '--dtdattr[loaddtd + populate the tree with inherited attributes]' \
+      '--stream[use the streaming interface to process very large files]' \
+      '--walker[create a reader and walk though the resulting doc]' \
+      '--pattern[test the pattern support]:pattern value' \
+      '--chkregister[verify the node registration code]' \
+      '(--dtdvalid --postvalid --schema)--relaxng[do RelaxNG validation against specified schema]:schema:_webbrowser' \
+      '(--dtdvalid --postvalid --relaxng)--schema[do validation against specified WXS schema]:schema:_webbrowser' \
+      '(--dtdvalid --postvalid --relaxng)--schematron[do validation against specified schematron]:schema:_webbrowser' \
+      '--sax1[use the old SAX1 interfaces for processing]' \
+      '--sax[do not build a tree but work just at the SAX level]' \
+      '*:XML file:_webbrowser' && return
+  ;;
+  *XML_CATALOG_FILES*)
+    compset -q
+    if [[ -prefix *: ]]; then
+      _urls
+      return
+    fi
+    
+    compset -S ':*'
+    _alternative \
+      'files:catalog file:_files' \
+      'url-schemas:URL schema:compadd -S "" file:///' && return
+  ;;
+esac
+
+return 1
+
+
diff --git a/Completion/X/Command/_gv b/Completion/X/Command/_gv
new file mode 100644
index 000000000..6075de508
--- /dev/null
+++ b/Completion/X/Command/_gv
@@ -0,0 +1,42 @@
+#compdef gv
+
+_arguments \
+  '-geometry:geometry:_x_geometry' \
+  '(--nosafer)--safer' \
+  '(--safer)--nosafer' \
+  '(--noquiet)--quiet' \
+  '(--quiet)--noquiet' \
+  '(--nocenter)--center' \
+  '(--center)--nocenter' \
+  '(--noswap)--swap' \
+  '(--swap)--noswap' \
+  '(--noantialias)--antialias' \
+  '(--antialias)--noantialias' \
+  '(--nodsc)--dsc' \
+  '(--dsc)--nodsc' \
+  '(--noeof)--eof' \
+  '(--eof)--noeof' \
+  '(--nopixmap)--pixmap' \
+  '(--pixmap)--nopixmap' \
+  '(--nowatch)--watch' \
+  '(--watch)--nowatch' \
+  '(--noresize)--resize' \
+  '(--resize)--noresize' \
+  '(--grayscale --color)--monochrome' \
+  '(--monochrome --color)--grayscale' \
+  '(--grayscale --color)--monochrome' \
+  '(--landscape --seascape --upsidedown)--portrait' \
+  '(--portrait --seascape --upsidedown)--landscape' \
+  '(--portrait --landscape --upsidedown)--seascape' \
+  '(--portrait --landscape --seascape)--upsidedown' \
+  --{help,spartan} \
+  -{h,v} \
+  '--arguments=:ghostscript arguments:' \
+  '--page=:label of first page:' \
+  '--media=:page size:(Letter Legal Statement Tabloid Ledger Folio Quarto 10x14 Executive A3 A4 A5 B4 B5)' \
+  '--orientation=:orientation:' \
+  '--scale=:scale entry:' \
+  '--scalebase=:scale base:' \
+  '--ad=:resource file:_files' \
+  '--style=:resource file:_files' \
+  '*:file: _pspdf -z'