mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-12 01:11:27 +02:00
allow tag-order to select order of files and urls (16330)
This commit is contained in:
parent
5cf4508f42
commit
aed1bad64a
5 changed files with 38 additions and 29 deletions
|
@ -1,6 +1,13 @@
|
||||||
|
2001-12-12 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 16330: Completion/X/Command/_netscape,
|
||||||
|
Completion/Unix/Command/_lynx, Completion/Unix/Command/_links,
|
||||||
|
Completion/Unix/Command/_w3m: allow tag-order to select order of
|
||||||
|
files and urls instead of files first
|
||||||
|
|
||||||
2001-12-11 Clint Adams <clint@zsh.org>
|
2001-12-11 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
* 16326: Completion/Debian/Command/_dpkg:
|
* 16327: Completion/Debian/Command/_dpkg:
|
||||||
glob for udebs as well as debs.
|
glob for udebs as well as debs.
|
||||||
|
|
||||||
* 16326: Completion/Unix/Command/_webbrowser,
|
* 16326: Completion/Unix/Command/_webbrowser,
|
||||||
|
|
|
@ -24,8 +24,6 @@ _arguments -C \
|
||||||
'-help' \
|
'-help' \
|
||||||
':url:->html' && return 0
|
':url:->html' && return 0
|
||||||
|
|
||||||
case "$state" in
|
if [[ "$state" = html ]]; then
|
||||||
html)
|
_alternative 'files:file:_files "*.html"' 'urls:url:_urls'
|
||||||
_files -g '*.html' || _urls
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
|
@ -107,6 +107,6 @@ restrictions)
|
||||||
outside_telnet print shell suspend telnet_port useragent
|
outside_telnet print shell suspend telnet_port useragent
|
||||||
;;
|
;;
|
||||||
html)
|
html)
|
||||||
_files -g '*.html' || _urls
|
_alternative 'files:file:_files "*.html"' 'urls:url:_urls'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -42,7 +42,7 @@ case $state in
|
||||||
compadd $_w3mhistory
|
compadd $_w3mhistory
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_urls || _files -g '*.html'
|
_alternative 'files:file:_files "*.html"' 'urls:url:_urls'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -24,9 +24,6 @@ _x_arguments -C \
|
||||||
-{component-bar,composer,edit,messenger,mail,discussions,news} \
|
-{component-bar,composer,edit,messenger,mail,discussions,news} \
|
||||||
'*:location:->urls' && ret=0
|
'*:location:->urls' && ret=0
|
||||||
|
|
||||||
[[ "$state" = "urls" ]] &&
|
|
||||||
_files "$@" && return 0
|
|
||||||
|
|
||||||
# Handle netscape remote commands
|
# Handle netscape remote commands
|
||||||
if [[ "$state" = "remote" ]]; then
|
if [[ "$state" = "remote" ]]; then
|
||||||
local -a remote_commands
|
local -a remote_commands
|
||||||
|
@ -69,11 +66,15 @@ if [[ "$state" = "remote" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$state" = "urls" ]]; then
|
if [[ "$state" = "urls" ]]; then
|
||||||
|
_tags files urls
|
||||||
|
while _tags; do
|
||||||
|
_requested files expl 'file' _files "$@" && ret=0
|
||||||
|
if _requested urls; then
|
||||||
# Complete netscape urls
|
# Complete netscape urls
|
||||||
if compset -P about: ; then
|
if compset -P about: ; then
|
||||||
_wanted values expl 'about what' \
|
_wanted values expl 'about what' \
|
||||||
compadd "$@" authors blank cache document fonts global hype image-cache \
|
compadd "$@" authors blank cache document fonts global hype \
|
||||||
license logo memory-cache mozilla plugins && ret=0
|
image-cache license logo memory-cache mozilla plugins && ret=0
|
||||||
elif compset -P news: ; then
|
elif compset -P news: ; then
|
||||||
_newsgroups "$@" && ret=0
|
_newsgroups "$@" && ret=0
|
||||||
else
|
else
|
||||||
|
@ -88,5 +89,8 @@ if [[ "$state" = "urls" ]]; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
(( ret )) || return 0
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in a new issue