mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 14:51:15 -03:00
Yet another attempt to avoid gnuisms in sed/grep for ssh completions
darcs-hash:20051218225150-ac50b-d2ec7c6b5c715a68dcc4f2d9d67636c70868da7d.gz
This commit is contained in:
@@ -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)@
|
||||
|
||||
Reference in New Issue
Block a user