diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2001-03-11 22:53:41 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2001-03-11 22:53:41 +0000 |
commit | e264c1bee199acd99267e2142ab22507cadb488a (patch) | |
tree | af471605f1dafb99214a91b44dedd17f350ae703 /Completion/User/_urls | |
parent | c140245164e0448685940f17fd8efcbc8109b237 (diff) | |
download | zsh-e264c1bee199acd99267e2142ab22507cadb488a.tar.gz zsh-e264c1bee199acd99267e2142ab22507cadb488a.tar.xz zsh-e264c1bee199acd99267e2142ab22507cadb488a.zip |
Various new, improved, fixed or updated functions (13600)
Diffstat (limited to 'Completion/User/_urls')
-rw-r--r-- | Completion/User/_urls | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Completion/User/_urls b/Completion/User/_urls index 06df60c28..78a72f890 100644 --- a/Completion/User/_urls +++ b/Completion/User/_urls @@ -1,4 +1,4 @@ -#compdef curl +#compdef curl galeon # Usage: _urls [-f] # Options: @@ -38,7 +38,7 @@ # E.g.: # zstyle ':completion:*:urls' local www /usr/local/apache/htdocs public_html -local ipre scheme host user uhosts ret=1 expl match glob +local ipre scheme host user uhosts ret=1 expl match glob suf local urls_path localhttp zstyle -s ":completion:${curcontext}:urls" path urls_path || urls_path="${ZDOTDIR:-$HOME}/.zsh/urls" @@ -118,16 +118,16 @@ case "$scheme" in esac # Complete hosts -if ! compset -P '(#b)([^/]#)/'; then +if ! compset -P '(#b)([^:/]#)([:/])'; then uhosts=($urls_path/$scheme/$PREFIX*$SUFFIX(/:t)) _tags hosts while _tags; do while _next_label hosts expl host "$@"; do - compset -S '/*' || suf="/" - (( $#uhosts )) || _hosts -S "$suf" "$expl[@]" && ret=0 + compset -S '[:/]*' || suf="/" + (( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0 [[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername) - compadd -S "$suf" "$expl[@]" -a uhosts && ret=0 + compadd -S "$suf" -r '/:' "$expl[@]" -a uhosts && ret=0 done (( ret )) || return 0 done @@ -135,6 +135,8 @@ if ! compset -P '(#b)([^/]#)/'; then fi host="$match[1]" +[[ $match[2] = ':' ]] && ! compset -P '<->/' && _message 'port number' && return 0 + # Complete part after hostname _tags -C local files || return 1 |