summary refs log tree commit diff
path: root/Completion/Linux/Command
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2005-06-24 14:48:52 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2005-06-24 14:48:52 +0000
commit70a3d4e4b1327ddd17c6bb5900dcf0b69be9bc7c (patch)
tree4ff9a374790568c2a412621fbc4244efe3fd8f75 /Completion/Linux/Command
parent4d8f3c396477a37c863cc80b954c4bc6d190683b (diff)
downloadzsh-70a3d4e4b1327ddd17c6bb5900dcf0b69be9bc7c.tar.gz
zsh-70a3d4e4b1327ddd17c6bb5900dcf0b69be9bc7c.tar.xz
zsh-70a3d4e4b1327ddd17c6bb5900dcf0b69be9bc7c.zip
21380: update for wget 1.10, add missing descriptions and other minor fixes
Diffstat (limited to 'Completion/Linux/Command')
-rw-r--r--Completion/Linux/Command/_iwconfig81
-rw-r--r--Completion/Linux/Command/_mii-tool20
-rw-r--r--Completion/Linux/Command/_tune2fs40
3 files changed, 90 insertions, 51 deletions
diff --git a/Completion/Linux/Command/_iwconfig b/Completion/Linux/Command/_iwconfig
index 5957a7603..8ec8dfef2 100644
--- a/Completion/Linux/Command/_iwconfig
+++ b/Completion/Linux/Command/_iwconfig
@@ -1,29 +1,68 @@
 #compdef iwconfig
 
-local iwparams prevword expl
+local curcontext="$curcontext" state line expl ret=1
 
-iwparams=(
-essid nwid freq channel sens mode ap nick rate rts frag txpower enc
-key power retry
-)
+_arguments -C \
+  '(1 * -)--help[display help information]' \
+  '(1 * -)--version[display version information]' \
+  '1:network interface:_net_interfaces' \
+  '*:parameter:->parameters' && ret=0
 
-if (( CURRENT == 2 )); then
-  _net_interfaces || compadd -- --help --version
-  return
-fi
-
-prevword="$words[CURRENT-1]"
+if [[ -n "$state" ]]; then
+  local -a arg
 
-if [[ -n ${iwparams[(r)$prevword]} ]]; then
-  case "$prevword" in
-    (mode)
-      _wanted tag expl 'operating mode' \
-        compadd Ad-Hoc Managed Master Repeater Secondary Monitor Auto
+  case $words[CURRENT-1] in
+    essid)  _wanted -x names expl 'network name' compadd off any on ;;
+    nwid|domain) _message -e ids 'network id' ;;
+    freq|channel) _message -e channels 'channel or frequency' ;;
+    sens) _message -e levels 'signal level' ;;
+    mode)
+      _wanted modes expl 'operating mode' compadd \
+          Ad-Hoc Managed Master Repeater Secondary Monitor Auto
+    ;;
+    ap) _message -e access-points 'access point' ;;
+    nick*) _message -e names 'nickname' ;;
+    rate|bit*) _message -e bit-rates 'bit rate' ;;
+    rts*|frag*) _message -e sizes 'size' ;;
+    key|enc*) _message -e keys 'key' ;;
+    power)
+      arg=(
+        \*{min,max}'[modifier]'
+	'*off[disable power management]'
+	'*on[enable power management]'
+	'*all[receive all packets]'
+	'unicast[receive unicast packets only]'
+	'multicast[receive multicast and broadcast packets only]'
+      )
+    ;&
+    min|max)
+      _values -S ' ' -w 'parameter' \
+        'period[set the period between wake ups]' \
+	'timeout[set timeout before sleep]' \
+	$arg[@] && ret=0
+    ;;
+    period|timeout) _message -e timeouts 'timeout' ;;
+    txpower) _message -e power 'transmit power' ;;
+    retry) _message -e retries 'retries' ;;
+    *)
+      _values -S ' ' -w 'option' \
+      	'essid[set the network name]' \
+	'(nwid domain)'{nwid,domain}'[set the network ID]' \
+	'(freq channel)'{freq,channel}'[set the operating frequency or channel]' \
+	'sens[set the sensitivity threhold]' \
+      	'mode[set operating mode]' \
+	'ap[register with given access point]' \
+	'(nick nickname)'nick{,name}'[set the nickname]' \
+	'(rate bit)'{rate,bit}'[set the bitrate]' \
+	'rts[set packet size threshold for sending RTS]' \
+	'frag[set maximum packet fragment size]' \
+	\*{key,enc}'[add encryption key]' \
+	'*power[manipulate power management scheme parameters]' \
+	'txpower[set transmit power]' \
+	'retry[set number of retries]' \
+	'commit[apply changes imediately]' && ret=0
     ;;
-    (*)
-      _wanted tag expl "$prevword value" \
-        compadd off
   esac
-else
-  _wanted tag expl 'iwconfig parameter' compadd $iwparams commit
 fi
+
+return ret
diff --git a/Completion/Linux/Command/_mii-tool b/Completion/Linux/Command/_mii-tool
index cf16ca49c..8da6da69d 100644
--- a/Completion/Linux/Command/_mii-tool
+++ b/Completion/Linux/Command/_mii-tool
@@ -1,12 +1,12 @@
 #compdef mii-tool
 
-_arguments \
-	'(-V --version)'{-V,--version}'[version]' \
-	'(-v --verbose)'{-v,--verbose}'[verbose]' \
-	'(-R --reset)'{-R,--reset}'[reset MII to poweron state]' \
-	'(-r --restart)'{-r,--restart}'[restart autonegotiation]' \
-	'(-w --watch)'{-w,--watch}'[monitor for link status changes]' \
-	'(-l --log)'{-l,--log}'[write events to syslog]' \
-	'(-A --advertise)'{-A,--advertise=}'[advertise only specified media]:media:_values -s , 100baseT4 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD 100baseTx 10baseT' \
-	'(-F --force)'{-F,--force=}'[force specified medium]:medium:(100baseT4 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD 100baseTx 10baseT)' \
-	'*:interface:_net_interfaces'
+_arguments -s \
+  '(-V --version)'{-V,--version}'[display version information]' \
+  '(-v --verbose)'{-v,--verbose}'[verbose output]' \
+  '(-R --reset)'{-R,--reset}'[reset MII to poweron state]' \
+  '(-r --restart)'{-r,--restart}'[restart autonegotiation]' \
+  '(-w --watch)'{-w,--watch}'[monitor for link status changes]' \
+  '(-l --log)'{-l,--log}'[write events to syslog]' \
+  '(-A --advertise)'{-A,--advertise=}'[advertise only specified media]:medium:_values -s , medium 100baseT4 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD 100baseTx 10baseT' \
+  '(-F --force)'{-F,--force=}'[force specified medium]:medium:(100baseT4 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD 100baseTx 10baseT)' \
+  '*:interface:_net_interfaces'
diff --git a/Completion/Linux/Command/_tune2fs b/Completion/Linux/Command/_tune2fs
index 74d1a6f08..73ce2dd12 100644
--- a/Completion/Linux/Command/_tune2fs
+++ b/Completion/Linux/Command/_tune2fs
@@ -1,23 +1,23 @@
 #compdef tune2fs
 
 _arguments \
-	'-c[max mount count]:number of times:' \
-	'-C[set mount count]:number of times:' \
-	'-e[set error behavior]:error behavior:(continue remount-ro panic)' \
-	'-f[force tune2fs to complete even in the face of errors]' \
-	'-g[set the group which can use reserved filesystem blocks]:group:_groups' \
-	'-i[interval between checks]:duration:' \
-	'-j[add an ext3 journal to the filesystem]' \
-	'-J[journal options]:options:_values -s , size:size: device:blockdevice:_files' \
-	'-l[list the contents of the filesystem superblock]' \
-	'-L[set the volume label of the filesystem]:label:' \
-	'-m[set the percentage of reserved filesystem blocks]:percentage:' \
-	'-M[set the last-mounted directory for the filesystem]:directory:_files -/' \
-	'-o[mount options]:options:_values -s , debug bsdgroups user_xattr acl uid16 journal_data journal_data_ordered journal_data_writeback' \
-	'-O[filesystem features]:features:_values -s , dir_index filetype has_journal sparse_super' \
-	'-r[set the number of reserved filesystem blocks]:number:' \
-	'-s[set sparse super feature]:on or off:(0 1)' \
-	'-T[set time last checked]:time specifier:' \
-	'-u[set user who can use reserved filesystem blocks]:user:_users' \
-	'-U[set filesystem UUID]:UUID or special:(clear random time)' \
-	':device:_files'
+  '-c[set max mounts between checks]:number of mounts' \
+  '-C[set mount count]:number of mounts' \
+  '-e[set error behavior]:error behavior:(continue remount-ro panic)' \
+  '-f[force tune2fs to complete even in the face of errors]' \
+  '-g[set the group which can use reserved filesystem blocks]:group:_groups' \
+  '-i[interval between checks]:duration' \
+  '-j[add an ext3 journal to the filesystem]' \
+  '-J[journal options]: :_values -s , option "size[specify journal size]\:size" "device[use external journal]\:block device\:_files"' \
+  '-l[list the contents of the filesystem superblock]' \
+  '-L[set the volume label of the filesystem]:label' \
+  '-m[set the percentage of reserved filesystem blocks]:percentage' \
+  '-M[set the last-mounted directory for the filesystem]:directory:_files -/' \
+  '-o[mount options]:options:_values -s , debug bsdgroups user_xattr acl uid16 journal_data journal_data_ordered journal_data_writeback' \
+  '-O[set or clear filesystem features]: :_values -s , feature dir_index filetype has_journal sparse_super' \
+  '-r[set the number of reserved filesystem blocks]:number' \
+  '-s[set sparse super feature]:state:((0\:off 1\:on))' \
+  '-T[set time last checked]:time specifier' \
+  '-u[set user who can use reserved filesystem blocks]:user:_users' \
+  '-U[set filesystem UUID]:UUID or special:(clear random time)' \
+  ':device:_files'