summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_w3m
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_w3m')
-rw-r--r--Completion/Unix/Command/_w3m19
1 files changed, 5 insertions, 14 deletions
diff --git a/Completion/Unix/Command/_w3m b/Completion/Unix/Command/_w3m
index 70ac75e4c..683a9f67d 100644
--- a/Completion/Unix/Command/_w3m
+++ b/Completion/Unix/Command/_w3m
@@ -1,6 +1,6 @@
#compdef w3m
-local curcontext="$curcontext" state line ret=1
+local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C \
@@ -31,19 +31,10 @@ _arguments -C \
'-o[option]:option-value:' \
'-config:config file:_files' \
'-debug' \
- ':url:->url' && ret=0
+ ':url:->html' && return 0
case $state in
- url)
- local _w3mhistory
-
- if [[ -s ~/.w3m/history ]]; then
- _w3mhistory=(${(f)"$(<$HOME/.w3m/history)"})
- compadd $_w3mhistory && ret=0
- fi
-
- _urls -f && ret=0
- ;;
+ html)
+ _alternative 'files:file:_files -g "*.x#html"' 'urls:url:_w3mhist'
+ ;;
esac
-
-return ret