diff options
author | Clint Adams <clint@users.sourceforge.net> | 2005-03-07 18:59:33 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2005-03-07 18:59:33 +0000 |
commit | 8d906d28225b7edc63d27232b9cb3e28d5df52ee (patch) | |
tree | e4f1d38413e63e60430c8f26484dbbcbe952dd28 | |
parent | 9edff429d8c08006b569ed76ded5e9c176e4a8c2 (diff) | |
download | zsh-8d906d28225b7edc63d27232b9cb3e28d5df52ee.tar.gz zsh-8d906d28225b7edc63d27232b9cb3e28d5df52ee.tar.xz zsh-8d906d28225b7edc63d27232b9cb3e28d5df52ee.zip |
* 20946: Completion/Linux/Command/_iwconfig: completion for iwconfig command.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Linux/Command/_iwconfig | 29 |
2 files changed, 34 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 24fda5877..e2511c27f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/Completion/Linux/Command/_iwconfig b/Completion/Linux/Command/_iwconfig new file mode 100644 index 000000000..5957a7603 --- /dev/null +++ b/Completion/Linux/Command/_iwconfig @@ -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 |