mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-09 19:51:26 +01:00
* 20946: Completion/Linux/Command/_iwconfig: completion for iwconfig command.
This commit is contained in:
parent
9edff429d8
commit
8d906d2822
2 changed files with 34 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-03-07 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 20946: Completion/Linux/Command/_iwconfig: completion for
|
||||
iwconfig command.
|
||||
|
||||
2005-03-07 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 20945: Src/Zle/zle_misc.c: rename static variables to
|
||||
|
|
29
Completion/Linux/Command/_iwconfig
Normal file
29
Completion/Linux/Command/_iwconfig
Normal file
|
@ -0,0 +1,29 @@
|
|||
#compdef iwconfig
|
||||
|
||||
local iwparams prevword expl
|
||||
|
||||
iwparams=(
|
||||
essid nwid freq channel sens mode ap nick rate rts frag txpower enc
|
||||
key power retry
|
||||
)
|
||||
|
||||
if (( CURRENT == 2 )); then
|
||||
_net_interfaces || compadd -- --help --version
|
||||
return
|
||||
fi
|
||||
|
||||
prevword="$words[CURRENT-1]"
|
||||
|
||||
if [[ -n ${iwparams[(r)$prevword]} ]]; then
|
||||
case "$prevword" in
|
||||
(mode)
|
||||
_wanted tag expl 'operating mode' \
|
||||
compadd Ad-Hoc Managed Master Repeater Secondary Monitor Auto
|
||||
;;
|
||||
(*)
|
||||
_wanted tag expl "$prevword value" \
|
||||
compadd off
|
||||
esac
|
||||
else
|
||||
_wanted tag expl 'iwconfig parameter' compadd $iwparams commit
|
||||
fi
|
Loading…
Reference in a new issue