2005-09-20 21:31:55 +08:00
|
|
|
#
|
|
|
|
# Load common ssh options
|
|
|
|
#
|
|
|
|
|
2006-02-15 10:22:28 +08:00
|
|
|
__fish_complete_ssh scp
|
2005-09-20 21:31:55 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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-19 06:51:50 +08:00
|
|
|
echo (commandline -ct)|sed -ne 's/\(.*@\).*/\1/p'
|
2005-09-20 21:31:55 +08:00
|
|
|
)(
|
|
|
|
cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
|
|
|
|
):
|
|
|
|
|
|
|
|
(__fish_print_users)@
|
|
|
|
|
|
|
|
"
|
2006-03-02 00:53:47 +08:00
|
|
|
complete -c scp -s B -d (N_ "Batch mode")
|
|
|
|
complete -c scp -s l -x -d (N_ "Bandwidth limit")
|
|
|
|
complete -c scp -s P -x -d (N_ "Port")
|
|
|
|
complete -c scp -s p -d (N_ "Preserves modification times, access times, and modes from the original file")
|
|
|
|
complete -c scp -s q -d (N_ "Do not display progress bar")
|
|
|
|
complete -c scp -s r -d (N_ "Recursively copy")
|
|
|
|
complete -c scp -s S -d (N_ "Encyption program")
|
2005-09-20 21:31:55 +08:00
|
|
|
|