diff options
Diffstat (limited to 'Completion/User/_netscape')
-rw-r--r-- | Completion/User/_netscape | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/Completion/User/_netscape b/Completion/User/_netscape index 23601de12..715ca408a 100644 --- a/Completion/User/_netscape +++ b/Completion/User/_netscape @@ -40,30 +40,31 @@ if [[ "$state" = "remote" ]]; then openFile*) _files -W ~;; saveAs*) if compset -P "*,"; then - _wanted types expl 'data type' && + _wanted types expl 'data type' \ compadd -s")" -M 'm:{a-zA-Z}={A-Za-z}' HTML Text PostScript && ret=0 else - _tags files && _path_files -W ~ && ret=0 + _files -W ~ && ret=0 fi ;; mailto*) compset -P "*," if compset -P '*@'; then - _wanted hosts expl 'remote host name' && - _hosts "$expl[@]" -q -S, && ret=0 + _wanted hosts expl 'remote host name' _hosts -q -S, && ret=0 else - _wanted users expl 'login name' && _users "$expl[@]" -q -S@ && ret=0 + _wanted users expl 'login name' _users -q -S@ && ret=0 fi ;; *) - if _wanted commands expl 'remote commands'; then + if _wanted commands; then if [[ -z "$QIPREFIX" ]]; then - compadd "$expl[@]" -s'(' -S '' -M 'm:{a-zA-Z}={A-Za-z}' - \ - $remote_commands && ret=0 + _loop commands expl 'remote commands' \ + compadd -s'(' -S '' -M 'm:{a-zA-Z}={A-Za-z}' - \ + $remote_commands && ret=0 else - compadd "$expl[@]" -qS '(' -M 'm:{a-zA-Z}={A-Za-z}' - \ - $remote_commands && ret=0 + _loop commands expl 'remote commands' \ + compadd -qS '(' -M 'm:{a-zA-Z}={A-Za-z}' - \ + $remote_commands && ret=0 fi fi ;; @@ -73,14 +74,16 @@ fi if [[ "$state" = "urls" ]]; then # Complete netscape urls 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 \ license logo memory-cache mozilla plugins && ret=0 else - if _tags prefixes; then - _description prefixes expl 'URL prefix' - compadd "$expl[@]" -S '' about: mocha: javascript: - _urls "$@" && ret=0 + if _wanted prefixes; then + while _try prefixes expl 'URL prefix'; do + compadd "$expl[@]" -S '' about: mocha: javascript: && ret=0 + _urls "$@" && ret=0 + (( ret )) || return 0 + done fi fi fi |