rsync completions: complete hostnames ala scp

Closes #1010
This commit is contained in:
David Adam 2013-09-19 23:24:07 +08:00
parent 3d68d1bbe2
commit fdef82f89c

View File

@ -104,6 +104,22 @@ complete -c rsync -s 6 -l ipv6 --description "Prefer IPv6"
complete -c rsync -l version --description "Display version and exit"
complete -c rsync -l help --description "Display help and exit"
#
# Hostname completion
#
complete -c rsync -d Hostname -a "
(__fish_print_hostnames):
(
#Prepend any username specified in the completion to the hostname
commandline -ct |sed -ne 's/\(.*@\).*/\1/p'
)(__fish_print_hostnames):
(__fish_print_users)@\tUsername
"
#
# Remote path
#