about summary refs log tree commit diff
path: root/Completion/Linux
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-06-25 09:03:04 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-06-25 09:03:04 +0000
commita267832ddf4150652fde3936858841bb2edbd9ae (patch)
tree961f0cbcaf8dbdaf2ff2e1a5409d644158f592bf /Completion/Linux
parentdd54fb249881fa882319cd2642780dcebb8d9f7c (diff)
downloadzsh-a267832ddf4150652fde3936858841bb2edbd9ae.tar.gz
zsh-a267832ddf4150652fde3936858841bb2edbd9ae.tar.xz
zsh-a267832ddf4150652fde3936858841bb2edbd9ae.zip
18631: returning too early breaks prefix-needed style set to false
Diffstat (limited to 'Completion/Linux')
-rw-r--r--Completion/Linux/Command/_modutils10
-rw-r--r--Completion/Linux/Command/_uml4
2 files changed, 8 insertions, 6 deletions
diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils
index 95dab8130..e3f33f8b5 100644
--- a/Completion/Linux/Command/_modutils
+++ b/Completion/Linux/Command/_modutils
@@ -1,6 +1,6 @@
 #compdef lsmod modinfo modprobe rmmod
 
-local curcontext="$curcontext" expl state line modules ign args
+local curcontext="$curcontext" expl state line modules ign args ret=1
 
 args=(
   '(-)'{-V,--version}'[print version]'
@@ -18,7 +18,7 @@ case "$service" in
       '(-)'{-l,--license}"[display the module's license]" \
       '(-)'{-n,--filename}"[display the module's filename]" \
       '(-)'{-p,--parameters}'[display the typed parameters that a module may support]' \
-      '1:module file:->all_modules' && return
+      '1:module file:->all_modules' && ret=0
   ;;
 
   modprobe)
@@ -37,7 +37,7 @@ case "$service" in
       "(-r --remove -l --list -t --type -a --all $ign)"{-r,--remove}'[remove module (stacks)]' \
       "(* -l --list -r --remove $ign)"{-l,--list}'[list matching modules]' \
       "(-c $ign)1:modules:->all_modules" \
-      "(-c -l --list -t --type $ign)*:params:->params" && return
+      "(-c -l --list -t --type $ign)*:params:->params" && ret=0
       
       [[ -n $state ]] && (( $+opt_args[-r] )) && state=loaded_modules        
   ;;
@@ -49,7 +49,7 @@ case "$service" in
       '(-r --stacks)'{-r,--stacks}'[remove a module stack]' \
       '(-s --syslog)'{-s,--syslog}'[output to syslog]' \
       '(-v --verbose)'{-v,--verbose}'[be verbose]' \
-      '*:loaded module:->loaded_modules' && return
+      '*:loaded module:->loaded_modules' && ret=0
   ;;
 esac 
 
@@ -80,4 +80,4 @@ case "$state" in
   ;;
 esac
 
-return 1
+return ret
diff --git a/Completion/Linux/Command/_uml b/Completion/Linux/Command/_uml
index 0e078e0a3..5c62f6234 100644
--- a/Completion/Linux/Command/_uml
+++ b/Completion/Linux/Command/_uml
@@ -12,6 +12,7 @@ case $service in
     _arguments \
       '-unix[listen on specified pair of sockets]:control socket: :data socket' \
       '-hub[act like a hub]'
+    return
   ;;
   uml_mconsole)
     if (( CURRENT == 2 )); then
@@ -46,7 +47,7 @@ case $service in
       '(* -)--version[display kernel version number]' \
       '(* -)--help[print usage information]' \
       '(* -)--showconfig[show kernel configuration]' \
-      '(-)*:option:->option' && return
+      '(-)*:option:->option' && ret=0
   ;;
   tunctl)
     _arguments \
@@ -55,6 +56,7 @@ case $service in
       '(-d)-u[specify owner]:owner:_users' \
       '(-b -u -t)-d[specify devicename to delete]:device name:(tap{0..9})' \
       '(-d)-t[specify devicename]:device name:(tap{0..9})'
+    return
   ;;
 esac