From aed1bad64acc50aaa4c34495957dd7b9c218b38d Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 12 Dec 2001 11:29:34 +0000 Subject: allow tag-order to select order of files and urls (16330) --- Completion/X/Command/_netscape | 46 +++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'Completion/X') diff --git a/Completion/X/Command/_netscape b/Completion/X/Command/_netscape index 99d6ee45c..be38e0c85 100644 --- a/Completion/X/Command/_netscape +++ b/Completion/X/Command/_netscape @@ -24,9 +24,6 @@ _x_arguments -C \ -{component-bar,composer,edit,messenger,mail,discussions,news} \ '*:location:->urls' && ret=0 -[[ "$state" = "urls" ]] && - _files "$@" && return 0 - # Handle netscape remote commands if [[ "$state" = "remote" ]]; then local -a remote_commands @@ -69,24 +66,31 @@ if [[ "$state" = "remote" ]]; then fi if [[ "$state" = "urls" ]]; then - # Complete netscape urls - if compset -P about: ; then - _wanted values expl 'about what' \ - compadd "$@" authors blank cache document fonts global hype image-cache \ - license logo memory-cache mozilla plugins && ret=0 - elif compset -P news: ; then - _newsgroups "$@" && ret=0 - else - _tags prefixes - while _tags; do - while _next_label prefixes expl 'URL prefix' "$@"; do - _urls "$expl[@]" && ret=0 - compset -S '[^:]*' - compadd -S '' "$expl[@]" about: news: mocha: javascript: && ret=0 - done - (( ret )) || return 0 - done - fi + _tags files urls + while _tags; do + _requested files expl 'file' _files "$@" && ret=0 + if _requested urls; then + # Complete netscape urls + if compset -P about: ; then + _wanted values expl 'about what' \ + compadd "$@" authors blank cache document fonts global hype \ + image-cache license logo memory-cache mozilla plugins && ret=0 + elif compset -P news: ; then + _newsgroups "$@" && ret=0 + else + _tags prefixes + while _tags; do + while _next_label prefixes expl 'URL prefix' "$@"; do + _urls "$expl[@]" && ret=0 + compset -S '[^:]*' + compadd -S '' "$expl[@]" about: news: mocha: javascript: && ret=0 + done + (( ret )) || return 0 + done + fi + fi + (( ret )) || return 0 + done fi return ret -- cgit 1.4.1