_tmux-cssh 1.07 KB
Newer Older
1
2
3
4
5
6
7
#compdef tmux-cssh

# tmux-cssh autocompletion for oh-my-zsh
# Requires: tmux-cssh installed
# Author: Manfred Touron (@moul)

_arguments \
Marc Cornellà's avatar
Marc Cornellà committed
8
9
10
11
12
13
14
15
16
17
  '(-h --help)'{-h,--help}'[This help.]' \
  '(-u --user)'{-u,--user}'[User to use.]' \
  '(-c --certificate)'{-c,--certificate}'[Path to ssh-certificate to use.]' \
  '(-sc --ssh)'{-sc,--ssh}'[SSH-connection-string, multiple.]' \
  '(-sa --ssh)'{-sa,--ssh}'[SSH connection arguments, used on every session.]' \
  '(-ts --tmux)'{-ts,--tmux}'[Alternative tmux-session-name, default: tmux-cssh]' \
  '(-ns --new)'{-ns,--new}'[Initializes a new session, like -ts \[name\].]' \
  '(-q --quiet)'{-q,--quiet}'[Quiet-mode.]' \
  '(-f --filename)'{-f,--filename}'[Filename of textfile to get -sc connection-strings from, line separated.]' \
  '(-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).]' \
18
19
20
21
22
  ':hosts:_hosts' \
  '*:: :->subcmds' \
  && return 0

if (( CURRENT == 1 )); then
Marc Cornellà's avatar
Marc Cornellà committed
23
24
  _describe -t commands "tmux-cssh command"
  return
25
fi