about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-02 13:58:40 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-02 13:58:40 +0000
commit87e290b4a3ea85ab29b5a3d7292b61cb754a9501 (patch)
treea8f853730602671d98dce1117bb854c78103bcad /Completion
parent5124df6cd95725c17b1fbdb662fe5d3b30e2ea28 (diff)
downloadzsh-87e290b4a3ea85ab29b5a3d7292b61cb754a9501.tar.gz
zsh-87e290b4a3ea85ab29b5a3d7292b61cb754a9501.tar.xz
zsh-87e290b4a3ea85ab29b5a3d7292b61cb754a9501.zip
zsh-workers/8490
Diffstat (limited to 'Completion')
-rw-r--r--Completion/User/_urls11
1 files changed, 6 insertions, 5 deletions
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]"