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