2005-09-20 13:31:55 +00:00
|
|
|
#
|
|
|
|
# Load common ssh options
|
|
|
|
#
|
|
|
|
|
|
|
|
complete -y ssh
|
|
|
|
|
|
|
|
#
|
|
|
|
# scp specific completions
|
|
|
|
#
|
|
|
|
|
|
|
|
complete -c scp -d Hostname -a "
|
|
|
|
|
|
|
|
(
|
|
|
|
#Find a suitable hostname from the knownhosts files
|
|
|
|
cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
|
|
|
|
):
|
|
|
|
|
|
|
|
(
|
|
|
|
#Prepend any username specified in the completion to the hostname
|
2005-12-18 22:51:50 +00:00
|
|
|
echo (commandline -ct)|sed -ne 's/\(.*@\).*/\1/p'
|
2005-09-20 13:31:55 +00:00
|
|
|
)(
|
|
|
|
cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
|
|
|
|
):
|
|
|
|
|
|
|
|
(__fish_print_users)@
|
|
|
|
|
|
|
|
"
|
2006-01-08 02:56:56 +00:00
|
|
|
complete -c scp -s B -d (_ "Batch mode")
|
|
|
|
complete -c scp -s l -x -d (_ "Bandwidth limit")
|
|
|
|
complete -c scp -s P -x -d (_ "Port")
|
|
|
|
complete -c scp -s p -d (_ "Preserves modification times, access times, and modes from the original file")
|
2006-01-09 19:28:15 +00:00
|
|
|
complete -c scp -s q -d (_ "Do not display progress bar")
|
2006-01-08 02:56:56 +00:00
|
|
|
complete -c scp -s r -d (_ "Recursively copy")
|
|
|
|
complete -c scp -s S -d (_ "Encyption program")
|
2005-09-20 13:31:55 +00:00
|
|
|
|