summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_dsh
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2014-08-26 00:48:18 +0200
committerAxel Beckert <abe@deuxchevaux.org>2014-08-26 00:48:18 +0200
commita55d381f745d669c0ef9bdf0a4ce78a045ff3070 (patch)
tree31c741d92f2077f241835005b8cfd1db251445f6 /Completion/Unix/Command/_dsh
parent478d6c1db2ad16ea6b3cb6010cf083f2513494cf (diff)
parentcc69eef1cd835cd8d3f33960e9f616c894e7ae4f (diff)
downloadzsh-a55d381f745d669c0ef9bdf0a4ce78a045ff3070.tar.gz
zsh-a55d381f745d669c0ef9bdf0a4ce78a045ff3070.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_dsh')
-rw-r--r--Completion/Unix/Command/_dsh33
1 files changed, 33 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_dsh b/Completion/Unix/Command/_dsh
new file mode 100644
index 000000000..688e024ce
--- /dev/null
+++ b/Completion/Unix/Command/_dsh
@@ -0,0 +1,33 @@
+#compdef dsh
+
+local curcontext="$curcontext" state line expl
+typeset -A opt_args
+
+_arguments -s -C -S \
+ '(-v --verbose -q --quiet)'{-v,--verbose}'[verbose output]' \
+ '(-q --quiet -v --verbose)'{-q,--quiet}'[quieter output]' \
+ '(-M --show-machine-names)'{-M,--show-machine-names}'[prepend the host name on output]' \
+ '(-i --duplicate-input)'{-i,--duplicate-input}'[duplicate input given to dsh]' \
+ '(-b --bufsize)'{-b,--bufsize}'[change buffer size used in input duplication]:buffer size for -i (bytes)' \
+ '(-m --machine)'{-m,--machine}'[execute on machine]:machine:{_hosts || _user_at_host}' \
+ '(-n --num-topology)'{-n,--num-topology}'[how to divide the machines]:number' \
+ '(-a --all)'{-a,--all}'[execute on all machines]' \
+ '(-g --group)'{-g,--group}'[execute on group member]:groupname:->groups' \
+ '(-f --file)'{-f,--file}'[use the file as list of machines]:file:_files' \
+ '(-r --remoteshell)'{-r,--remoteshell}'[execute using shell]:remote shell:(rsh ssh)' \
+ '(-o --remoteshellopt)'{-o,--remoteshellopt}'[option to give to remote shell ]:option' \
+ '(-)'{-h,--help}'[display help information]' \
+ '(-w --wait-shell -c --concurrent-shell)'{-w,--wait-shell}'[sequentially execute shell]' \
+ '(-c --concurrent-shell -w --wait-shell)'{-c,--concurrent-shell}'[execute shell concurrently]' \
+ '(-F --forklimit)'{-F,--forklimit}'[concurrent with limit on number]:fork limit' \
+ '(-)'{-V,--version}'[display version information]' \
+ '*::args: _normal' && return
+
+if [[ $state = groups ]]; then
+ if ! zstyle -s ":completion:$curcontext:dsh-groups" dsh-groups grp; then
+ [[ -e ~/.dsh/group ]] && grp="~/.dsh/group" || return 1
+ fi
+ _path_files -W ~/.dsh/group && return
+fi
+
+return 1