Use sed instead of grep, since grep -o isn't supported on OS X
darcs-hash:20051217221513-ac50b-1166a7d4814ee9e2cd960308fae4999431ebc3c1.gz
This commit is contained in:
parent
00be44a69a
commit
891c2fc379
@ -17,7 +17,7 @@ complete -c scp -d Hostname -a "
|
||||
|
||||
(
|
||||
#Prepend any username specified in the completion to the hostname
|
||||
echo (commandline -ct)|grep -o '.*@'
|
||||
echo (commandline -ct)|sed -nre '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)|grep -o '.*@'
|
||||
echo (commandline -ct)|sed -nre 's/(.*@).*/\1/p'
|
||||
)(__fish_print_hostnames)
|
||||
|
||||
(__fish_print_users)@
|
||||
|
Loading…
x
Reference in New Issue
Block a user