Fix "adr" typo in ssh -b completion, use one sed instead of two awk calls.

This commit is contained in:
Ville Skyttä 2009-10-31 14:24:01 +02:00
parent 503c224899
commit d062d3b570
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ bash-completion (2.x)
* Apply cardctl completion to pccardctl too.
* Apply pine completion to alpine too.
* Remove many unnecessary short option completions where long ones exist.
* Improve cvs, gkrellm, lftp, mdadm, and mysqladmin completions.
* Improve cvs, gkrellm, lftp, mdadm, mysqladmin, and ssh completions.
* Add abook and wtf completion, based on work by Raphaël Droz.
* Add lftpget completion.
* Don't overwrite other host completions when completing from multiple

View File

@ -66,7 +66,7 @@ _ssh()
;;
-b)
COMPREPLY=( $( compgen -W "$( PATH="$PATH:/sbin" ifconfig | \
awk '/adr:/ {print $2}' | awk -F: '{print $2}' )" -- "$cur" ) )
sed -ne 's/.*addr:\([^[:space:]]*\).*/\1/p' )" -- "$cur" ) )
return 0
;;
esac