This commit is contained in:
crater2150 2018-08-28 20:35:06 +02:00
parent 209b0cc260
commit 5b127cca55
3 changed files with 95 additions and 2 deletions

15
compdef/_sfs Normal file
View file

@ -0,0 +1,15 @@
#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 "$@"
}