f7ed7244c23b5c9dab14ea40aa326049ca0911d9

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Merge pull request #3321 from moul/pr-tmux-cssh

[tmux-cssh plugin] Initial version

Diff

 1diff --git a/plugins/tmux-cssh/_tmux-cssh b/plugins/tmux-cssh/_tmux-cssh
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..604e2e4783c0a8763f2773ca7bf2f5a425ca46c6
 4--- /dev/null
 5+++ b/plugins/tmux-cssh/_tmux-cssh
 6@@ -0,0 +1,25 @@
 7+#compdef tmux-cssh
 8+
 9+# tmux-cssh autocompletion for oh-my-zsh
10+# Requires: tmux-cssh installed
11+# Author: Manfred Touron (@moul)
12+
13+_arguments \
14+'(-h --help)'{-h,--help}'[This help.]' \
15+'(-u --user)'{-u,--user}'[User to use.]' \
16+'(-c --certificate)'{-c,--certificate}'[Path to ssh-certificate to use.]' \
17+'(-sc --ssh)'{-sc,--ssh}'[SSH-connection-string, multiple.]' \
18+'(-sa --ssh)'{-sa,--ssh}'[SSH connection arguments, used on every session.]' \
19+'(-ts --tmux)'{-ts,--tmux}'[Alternative tmux-session-name, default: tmux-cssh]' \
20+'(-ns --new)'{-ns,--new}'[Initializes a new session, like -ts \[name\].]' \
21+'(-q --quiet)'{-q,--quiet}'[Quiet-mode.]' \
22+'(-f --filename)'{-f,--filename}'[Filename of textfile to get -sc connection-strings from, line separated.]' \
23+'(-cs --config)'{-cs,--config}'[Name of config-settings which should be get from config-file "$HOME/.tmux-cssh". Which can be a grep-regular expression to find the name(s).]' \
24+  ':hosts:_hosts' \
25+  '*:: :->subcmds' \
26+  && return 0
27+
28+if (( CURRENT == 1 )); then
29+    _describe -t commands "tmux-cssh command"
30+    return
31+fi