mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 15:37:24 +00:00
Yet another attempt to avoid gnuisms in sed/grep for ssh completions
darcs-hash:20051218225150-ac50b-d2ec7c6b5c715a68dcc4f2d9d67636c70868da7d.gz
This commit is contained in:
parent
891c2fc379
commit
20b269130c
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ complete -c scp -d Hostname -a "
|
|||
|
||||
(
|
||||
#Prepend any username specified in the completion to the hostname
|
||||
echo (commandline -ct)|sed -nre 's/(.*@).*/\1/p'
|
||||
echo (commandline -ct)|sed -ne 's/\(.*@\).*/\1/p'
|
||||
)(
|
||||
cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
|
||||
):
|
||||
|
|
|
@ -71,7 +71,7 @@ complete -x -c ssh -d Hostname -a "
|
|||
|
||||
(
|
||||
#Prepend any username specified in the completion to the hostname
|
||||
echo (commandline -ct)|sed -nre 's/(.*@).*/\1/p'
|
||||
echo (commandline -ct)|sed -ne 's/\(.*@\).*/\1/p'
|
||||
)(__fish_print_hostnames)
|
||||
|
||||
(__fish_print_users)@
|
||||
|
|
Loading…
Reference in a new issue