From 87e290b4a3ea85ab29b5a3d7292b61cb754a9501 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 2 Nov 1999 13:58:40 +0000 Subject: zsh-workers/8490 --- Completion/User/_urls | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Completion') diff --git a/Completion/User/_urls b/Completion/User/_urls index 1bc1ac76d..21d3deaa6 100644 --- a/Completion/User/_urls +++ b/Completion/User/_urls @@ -37,7 +37,7 @@ # name used by a user placing web pages within their home area. # e.g. compconf urls_localhttp=www:/usr/local/apache/htdocs:public_html -local ipre scheme host user hosts ret=1 expl +local ipre scheme host user uhosts ret=1 expl local urls_path="${compconfig[urls_path]:-${ZDOTDIR:-$HOME}/.zsh/urls}" local localhttp_servername="${${(@s.:.)compconfig[urls_localhttp]}[1]}" local localhttp_documentroot="${${(@s.:.)compconfig[urls_localhttp]}[2]}" @@ -93,10 +93,11 @@ esac # Complete hosts if ! compset -P '(#b)([^/]#)/'; then - hosts=($urls_path/$scheme/$PREFIX*$SUFFIX(/:t)) - (( $#hosts )) || _hosts -S/ && ret=0 - [[ "$scheme" = http ]] && hosts=($hosts $localhttp_servername) - compadd "$@" -QS/ - $hosts && ret=0 + uhosts=($urls_path/$scheme/$PREFIX*$SUFFIX(/:t)) + (( $#uhosts )) || _hosts -S/ && ret=0 + [[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername) + _description expl host + compadd "$expl[@]" "$@" -QS/ - $uhosts && ret=0 return $ret fi host="$match[1]" -- cgit 1.4.1