Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _iwconfig
- X-seq: zsh-workers 20946
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: _iwconfig
- Date: Mon, 7 Mar 2005 13:58:43 -0500
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Index: Completion/Linux/Command/_iwconfig
===================================================================
RCS file: Completion/Linux/Command/_iwconfig
diff -N Completion/Linux/Command/_iwconfig
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Completion/Linux/Command/_iwconfig 7 Mar 2005 18:54:35 -0000
@@ -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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author