mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 12:13:55 +08:00
34e27ff4c2
darcs-hash:20070116011828-ac50b-fb923dc877869ded4d506bbe0bc5364eea44092f.gz
36 lines
911 B
Fish
36 lines
911 B
Fish
#
|
|
# Load common ssh options
|
|
#
|
|
|
|
__fish_complete_ssh scp
|
|
|
|
#
|
|
# 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
|
|
echo (commandline -ct)|sed -ne 's/\(.*@\).*/\1/p'
|
|
)(
|
|
cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
|
|
):
|
|
|
|
(__fish_print_users)@
|
|
|
|
"
|
|
complete -c scp -s B --description "Batch mode"
|
|
complete -c scp -s l -x --description "Bandwidth limit"
|
|
complete -c scp -s P -x --description "Port"
|
|
complete -c scp -s p --description "Preserves modification times, access times, and modes from the original file"
|
|
complete -c scp -s q --description "Do not display progress bar"
|
|
complete -c scp -s r --description "Recursively copy"
|
|
complete -c scp -s S --description "Encyption program"
|
|
|