Test for Linux only once.

This commit is contained in:
Ville Skyttä 2009-05-29 23:10:35 +03:00
parent e3a51aa5f1
commit a4961d7edc

View File

@ -3,9 +3,10 @@
#
# bash completion for Linux wireless-tools
# Linux iwconfig(8) completion
#
[ $UNAME = Linux ] && have iwconfig &&
[ $UNAME = Linux ] &&
{
have iwconfig &&
_iwconfig()
{
local cur prev
@ -109,9 +110,8 @@ _iwconfig()
} &&
complete -F _iwconfig iwconfig
# Linux iwlist(8) completion
#
[ $UNAME = Linux ] && have iwlist &&
have iwlist &&
_iwlist()
{
local cur prev
@ -134,9 +134,8 @@ _iwlist()
} &&
complete -F _iwlist iwlist
# Linux iwspy(8) completion
#
[ $UNAME = Linux ] && have iwspy &&
have iwspy &&
_iwspy()
{
local cur
@ -156,9 +155,8 @@ _iwspy()
} &&
complete -F _iwspy iwspy
# Linux iwpriv(8) completion
#
[ $UNAME = Linux ] && have iwpriv &&
have iwpriv &&
_iwpriv()
{
local cur prev
@ -189,3 +187,5 @@ _iwpriv()
fi
} &&
complete -F _iwpriv iwpriv
}