Yet another attempt to avoid gnuisms in sed/grep for ssh completions

darcs-hash:20051218225150-ac50b-d2ec7c6b5c715a68dcc4f2d9d67636c70868da7d.gz
This commit is contained in:
axel 2005-12-19 08:51:50 +10:00
parent 891c2fc379
commit 20b269130c
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ complete -c scp -d Hostname -a "
( (
#Prepend any username specified in the completion to the hostname #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 cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
): ):

View file

@ -71,7 +71,7 @@ complete -x -c ssh -d Hostname -a "
( (
#Prepend any username specified in the completion to the hostname #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_hostnames)
(__fish_print_users)@ (__fish_print_users)@