mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
19468: capitalize URL abbreviation in completion descriptions
This commit is contained in:
parent
8b8cc745d9
commit
060e8f4eed
16 changed files with 38 additions and 26 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2004-02-26 Doug Kearns <djkea2@mugca.its.monash.edu.au>
|
||||
|
||||
* 19468: Completion/Unix/Command/_elinks,
|
||||
Completion/Unix/Command/_gpg, Completion/Unix/Command/_imagemagick,
|
||||
Completion/Unix/Command/_java, Completion/Unix/Command/_links,
|
||||
Completion/Unix/Command/_lynx, Completion/Unix/Command/_pine,
|
||||
Completion/Unix/Command/_subversion, Completion/Unix/Command/_w3m,
|
||||
Completion/Unix/Command/_webbrowser, Completion/Unix/Command/_wget,
|
||||
Completion/Unix/Type/_urls, Completion/X/Command/_mozilla,
|
||||
Completion/X/Command/_mplayer: capitalize URL abbreviation in
|
||||
completion descriptions
|
||||
|
||||
2004-02-26 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 19460: configure.ac, Src/Modules/terminfo.c,
|
||||
|
|
|
@ -29,7 +29,7 @@ _arguments -C -A '-*' \
|
|||
'*-no-numbering[do not number links in dump output]::boolean:(0 1)' \
|
||||
'*-touch-files[touch files in ~/.elinks when running with -no-connect/-session-ring]::boolean:(0 1)' \
|
||||
'(- 1)-version[print version information and exit]' \
|
||||
'1:url:->url' && ret=0
|
||||
'1:URL:->url' && ret=0
|
||||
|
||||
if [[ "$state" = url ]]; then
|
||||
local elinks_bookmarks
|
||||
|
@ -41,7 +41,7 @@ if [[ "$state" = url ]]; then
|
|||
_alternative \
|
||||
'files:file:_files' \
|
||||
'bookmarks:bookmark:compadd -a elinks_bookmarks' \
|
||||
'urls:url:_urls' && return
|
||||
'urls:URL:_urls' && return
|
||||
fi
|
||||
|
||||
return ret
|
||||
|
|
|
@ -100,7 +100,7 @@ _arguments -C -s -S -A "-*" \
|
|||
'(-N --notation-data)'{-N,--notation-data}'[put parameter in signature]:name=value' \
|
||||
'(--no-show-notation)--show-notation[show key signature notations]' \
|
||||
"(--show-notation)--no-show-notation[don't show key signature notations]" \
|
||||
'--set-policy-url:policy url' \
|
||||
'--set-policy-url:policy URL' \
|
||||
'(--no-show-policy-url)--show-policy-url' \
|
||||
"(--show-policy-url)--no-show-policy-url" \
|
||||
'--set-filename[specify file which is stored in messages]:file:_files' \
|
||||
|
|
|
@ -517,7 +517,7 @@ case "$service" in
|
|||
'-retrieve[retrieve matching files]' \
|
||||
'-timeout:maximum timeout' \
|
||||
'-type:remote system type:(UNIX VMS other)' \
|
||||
':url: _urls' && return
|
||||
':URL: _urls' && return
|
||||
;;
|
||||
|
||||
identify)
|
||||
|
|
|
@ -98,7 +98,7 @@ appletviewer)
|
|||
'-debug[run applet on jdb]' \
|
||||
'-encoding[specify character encoding for source files]:encoding:->encoding' \
|
||||
'-J-[specify java option]:java option:' \
|
||||
'*:url:_urls' && return 0
|
||||
'*:URL:_urls' && return 0
|
||||
;;
|
||||
|
||||
jar)
|
||||
|
@ -331,7 +331,7 @@ keytool)
|
|||
|
||||
jarsigner)
|
||||
_arguments \
|
||||
'-keystore[specify url for keystore location]:url for keystore location:' \
|
||||
'-keystore[specify URL for keystore location]:URL for keystore location:' \
|
||||
'-storetype[specify keystore type]:store type:' \
|
||||
'-storepass[specify password for keystore]:password:' \
|
||||
'-keypass[specify password for private key]:password:' \
|
||||
|
|
|
@ -25,11 +25,11 @@ _arguments -C \
|
|||
'(-help)-source[dump the source page]' \
|
||||
'(-help)-unrestartable-receive-timeout[timeout on non restartable connections]:secs:' \
|
||||
'(-help)-version[prints the links version number and exit]' \
|
||||
':url:->html' && ret=0
|
||||
':URL:->html' && ret=0
|
||||
|
||||
case $state in
|
||||
html)
|
||||
_alternative 'files:file:_files -g "*.x#html(-.)"' 'urls:url:_urls' && ret=0
|
||||
_alternative 'files:file:_files -g "*.x#html(-.)"' 'urls:URL:_urls' && ret=0
|
||||
;;
|
||||
graphics_drivers)
|
||||
vals=(${=${${${(f)"$(_call_program links-graphics-drivers links -driver help 2>&1)"}[-1]}//','/''}} )
|
||||
|
|
|
@ -128,7 +128,7 @@ _arguments -C \
|
|||
'-vikeys' \
|
||||
'-width=:NUMBER:' \
|
||||
'-with_backspaces' \
|
||||
':url:->html' && ret=0
|
||||
':URL:->html' && ret=0
|
||||
|
||||
case "$state" in
|
||||
restrictions)
|
||||
|
@ -140,7 +140,7 @@ restrictions)
|
|||
outside_telnet print shell suspend telnet_port useragent && return
|
||||
;;
|
||||
html)
|
||||
_alternative 'files:file:_files -g "*.x#html(-.)"' 'urls:url:_urls' && return
|
||||
_alternative 'files:file:_files -g "*.x#html(-.)"' 'urls:URL:_urls' && return
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ _arguments -s \
|
|||
"($opts $idx -url)-attach[go directly into composer with given file]:file:_files" \
|
||||
"($opts $idx -url)-attachlist[go to composer with given files]:file:_files" \
|
||||
"($opts $idx -url)-attach_and_delete[go to composer, attach file, delete when finished]:file:_files" \
|
||||
"($opts $idx $send)-url[open the given URL]:url:_email_addresses -c -P mailto\:" \
|
||||
"($opts $idx $send)-url[open the given URL]:URL:_email_addresses -c -P mailto\:" \
|
||||
"($opts $send)-f+[specify mailbox to load]:mailbox: _mailboxes" \
|
||||
"($opts $send)-c+[specify context to apply to -f arg]: :_guard '[0-9]#' number" \
|
||||
"($opts $send)-sort[specify sort order of folder]:sort order:(${(j: :)sortorder})" \
|
||||
|
|
|
@ -22,6 +22,6 @@ _arguments \
|
|||
'(-t --title)'{-t,--title}"[title attribute of feed (for '--add' and '--edit')]:feed title:" \
|
||||
"--unlock-title[unlock Title attribute of feed (for '--add' and '--edit')]" \
|
||||
"--unsave-items[don't save old items of feed (for '--add' and '--edit')]" \
|
||||
'(-u --url)'{-u,--url}"[URL attribute of feed (for '--add' and '--edit')]:url:_urls" \
|
||||
'(-u --url)'{-u,--url}"[URL attribute of feed (for '--add' and '--edit')]:URL:_urls" \
|
||||
'--verbose[turn on verbose output]' \
|
||||
'(-)'{-v,--version}'[display version information]'
|
||||
|
|
|
@ -78,7 +78,7 @@ _svn_subcommand () {
|
|||
;;
|
||||
log)
|
||||
_svn_subcmds+=(
|
||||
'1: : _alternative "files:file:_files -g \*\(e:_svn_controlled:\)" "urls:url:_svn_urls"'
|
||||
'1: : _alternative "files:file:_files -g \*\(e:_svn_controlled:\)" "urls:URL:_svn_urls"'
|
||||
'*:file:_files -g "*(e:_svn_controlled:)"'
|
||||
)
|
||||
;;
|
||||
|
@ -86,10 +86,10 @@ _svn_subcommand () {
|
|||
case $_svn_subcmd_usage in
|
||||
*(TARGET|URL*PATH)*)
|
||||
_svn_subcmds+=(
|
||||
'*: : _alternative "files:file:_files" "urls:url:_svn_urls"'
|
||||
'*: : _alternative "files:file:_files" "urls:URL:_svn_urls"'
|
||||
)
|
||||
;;
|
||||
*URL*) _svn_subcmds+=( ':url:_svn_urls' ) ;;
|
||||
*URL*) _svn_subcmds+=( ':URL:_svn_urls' ) ;;
|
||||
*PATH*) _svn_subcmds+=( '*:file:_files' ) ;;
|
||||
esac
|
||||
;;
|
||||
|
|
|
@ -30,7 +30,7 @@ _arguments -C \
|
|||
'-o[option]:option-value' \
|
||||
'-config:config file:_files' \
|
||||
'-debug' \
|
||||
':url:->html' \
|
||||
':URL:->html' \
|
||||
'+:goto line' && ret=0
|
||||
|
||||
if [[ -n $state ]]; then
|
||||
|
@ -39,10 +39,10 @@ if [[ -n $state ]]; then
|
|||
_tags files w3mhistory urls
|
||||
while _tags; do
|
||||
_requested files expl 'file' _files -g "*.x#html(-.)" && ret=0
|
||||
_requested urls expl 'url' _urls && ret=0
|
||||
_requested urls expl 'URL' _urls && ret=0
|
||||
if [[ -s ~/.w3m/history ]] && _requested w3mhistory; then
|
||||
w3mhistory=( ${(f)"$(<~/.w3m/history)"} )
|
||||
_all_labels w3mhistory expl 'url from history' compadd -a w3mhistory
|
||||
_all_labels w3mhistory expl 'URL from history' compadd -a w3mhistory
|
||||
fi
|
||||
(( ret )) || break
|
||||
done
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#compdef amaya arena chimera dillo express galeon grail gzilla hotjava konqueror light mmm Mosaic netrik opera phoenix retawq skipstone www xmosaic zen
|
||||
|
||||
_alternative 'files:file:_files' 'urls:url:_urls'
|
||||
_alternative 'files:file:_files' 'urls:URL:_urls'
|
||||
|
|
|
@ -48,7 +48,7 @@ _arguments -C -s \
|
|||
'--header=:string:' \
|
||||
'--proxy-user=:user:' \
|
||||
'--proxy-passwd=:password:' \
|
||||
'--referer=:url:_urls' \
|
||||
'--referer=:URL:_urls' \
|
||||
'(--save-headers -s)'{--save-headers,-s}'[save http headers]' \
|
||||
'(--user-agent -U)'{--user-agent=,-U+}'[specify user agent to identify as]:user-agent' \
|
||||
'--retr-symlinks' \
|
||||
|
@ -97,7 +97,7 @@ _arguments -C -s \
|
|||
'--sslcerttype=[specify client cert type]:certificate type:((0\:PEM 1\:ASN1))' \
|
||||
'--sslcheckcert=[check the server cert against given CA]: :(0 1)' \
|
||||
'--sslprotocol=[choose SSL protocol]:protocol version:((0\:automatic 1\:SSLv2 2\:SSLv3 3\:TLSv1))' \
|
||||
'*:url:_urls' && return 0
|
||||
'*:URL:_urls' && return 0
|
||||
|
||||
case "$state" in
|
||||
gauge)
|
||||
|
|
|
@ -48,7 +48,7 @@ zstyle -a ":completion:${curcontext}:urls" urls urls
|
|||
|
||||
if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]]; then
|
||||
[[ $#urls -eq 1 && -f $urls[1] ]] && urls=( $(< $urls[1]) )
|
||||
_wanted urls expl 'url' compadd -a urls && return 0
|
||||
_wanted urls expl 'URL' compadd -a urls && return 0
|
||||
urls=()
|
||||
fi
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ else
|
|||
'-jsconsole[start with JavaScript Console]' \
|
||||
'-venkman[start with JavaScript debugger]' \
|
||||
'-terminal[start with command line terminal]' \
|
||||
'-edit[start with editor]:url:_urls' \
|
||||
'-chrome[load the specified chrome]:url:_urls' \
|
||||
'-edit[start with editor]:URL:_urls' \
|
||||
'-chrome[load the specified chrome]:URL:_urls' \
|
||||
'-mail[start with mail]' \
|
||||
'-compose[start with messenger compose]:url:_urls' \
|
||||
'-compose[start with messenger compose]:URL:_urls' \
|
||||
'*:location:->urls' && ret=0
|
||||
fi
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ case "$state" in
|
|||
_requested files expl 'video file' _files -g \
|
||||
"*.(#i)(avi|mp3|mpg|mpe|mpeg|m1v|mov|asf|vob|mjpg|wma|wmv|asx|qt|rm|mkv|mka|ogm|ogg)(-.)" && ret=0
|
||||
if _requested urls; then
|
||||
while _next_label urls expl url; do
|
||||
while _next_label urls expl URL; do
|
||||
_urls "$expl[@]" && ret=0
|
||||
compadd -S '' "$expl[@]" {dvd,vcd,cdda,cddb,tv}:// && ret=0
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue