about summary refs log tree commit diff
path: root/Completion/Unix/Command/_w3m
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/Unix/Command/_w3m
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/Unix/Command/_w3m')
-rw-r--r--Completion/Unix/Command/_w3m23
1 files changed, 12 insertions, 11 deletions
diff --git a/Completion/Unix/Command/_w3m b/Completion/Unix/Command/_w3m
index 4ce8ad1e0..70ac75e4c 100644
--- a/Completion/Unix/Command/_w3m
+++ b/Completion/Unix/Command/_w3m
@@ -1,6 +1,6 @@
 #compdef w3m
 
-local curcontext="$curcontext" state line
+local curcontext="$curcontext" state line ret=1
 typeset -A opt_args
 
 _arguments -C \
@@ -31,18 +31,19 @@ _arguments -C \
   '-o[option]:option-value:' \
   '-config:config file:_files' \
   '-debug' \
-  ':url:->url' && return 0
+  ':url:->url' && ret=0
 
 case $state in
-	url)
-	local _w3mhistory
+  url)
+    local _w3mhistory
 
-	if [[ -s ~/.w3m/history ]]; then
-	   _w3mhistory=(${(f)"$(<$HOME/.w3m/history)"})
-	   compadd $_w3mhistory
-	fi
-
-	_urls -f
-	;;
+    if [[ -s ~/.w3m/history ]]; then
+      _w3mhistory=(${(f)"$(<$HOME/.w3m/history)"})
+      compadd $_w3mhistory && ret=0
+    fi
 
+    _urls -f && ret=0
+  ;;
 esac
+
+return ret