diff options
author | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2013-09-19 23:19:13 +0800 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2013-09-19 23:24:36 +0800 |
commit | 3d68d1bbe2863c67d64b89fda0dbe302e7caa90f (patch) | |
tree | 1d89ac1ef4109fa17f7476d50aa14c6a7dcdefc9 /share | |
parent | c2dcfc917635593f34b590dd3b53ae7866e9dfa3 (diff) |
scp completions: use __fish_print_hostnames rather than doing independent hostname searches
Diffstat (limited to 'share')
-rw-r--r-- | share/completions/scp.fish | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/share/completions/scp.fish b/share/completions/scp.fish index 104cf521..f7e131f5 100644 --- a/share/completions/scp.fish +++ b/share/completions/scp.fish @@ -10,17 +10,12 @@ __fish_complete_ssh scp 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 -): +(__fish_print_hostnames): ( #Prepend any username specified in the completion to the hostname commandline -ct |sed -ne 's/\(.*@\).*/\1/p' -)( - cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1 -): +)(__fish_print_hostnames): (__fish_print_users)@\tUsername |