zsh/compdef/_sfs
crater2150 5b127cca55 update
2018-08-28 20:35:06 +02:00

16 lines
318 B
Plaintext

#compdef sfs
if compset -P 1 '*:'; then
_remote_files -- ssh
elif compset -P 1 '*@'; then
_wanted hosts expl host _ssh_hosts -r: -S:
else
_alternative \
'hosts:remote host name:_ssh_hosts -r: -S:' \
'users:user:_ssh_users -qS@'
fi
_ssh_users () {
_combination -s '[:@]' my-accounts users-hosts users "$@"
}