From 891c2fc37931c34c241d96db96777fa648ee9062 Mon Sep 17 00:00:00 2001 From: axel Date: Sun, 18 Dec 2005 08:15:13 +1000 Subject: [PATCH] Use sed instead of grep, since grep -o isn't supported on OS X darcs-hash:20051217221513-ac50b-1166a7d4814ee9e2cd960308fae4999431ebc3c1.gz --- init/completions/scp.fish | 2 +- init/completions/ssh.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init/completions/scp.fish b/init/completions/scp.fish index 6585bb404..f763da7c7 100644 --- a/init/completions/scp.fish +++ b/init/completions/scp.fish @@ -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 ): diff --git a/init/completions/ssh.fish b/init/completions/ssh.fish index e48f921a7..5cdccbb93 100644 --- a/init/completions/ssh.fish +++ b/init/completions/ssh.fish @@ -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)@