scripts/completions/_ssh.zsh
Anna Schumaker f4a1f40eff Create a wrapper around ssh
To check if we're trying to ssh to a VM so the VM can be booted if it is
off

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2021-11-30 13:58:24 -05:00

16 lines
295 B
Bash

#compdef ssh.zsh
function _ssh.zsh() {
_arguments \
':args: _alternative
"hosts:hosts: _ssh_hosts"
"users:users: _ssh.zsh_users -qS@"
"domains:domains:($(virsh list --all --name))"'
}
_ssh.zsh_users () {
_combination -s '[:@]' my-accounts users-hosts users "$@"
}
_ssh.zsh "$@"