about summary refs log tree commit diff
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
parent5124df6cd95725c17b1fbdb662fe5d3b30e2ea28 (diff)
downloadzsh-87e290b4a3ea85ab29b5a3d7292b61cb754a9501.tar.gz
zsh-87e290b4a3ea85ab29b5a3d7292b61cb754a9501.tar.xz
zsh-87e290b4a3ea85ab29b5a3d7292b61cb754a9501.zip
zsh-workers/8490
-rw-r--r--Completion/User/_urls11
-rw-r--r--Src/Modules/parameter.c2
-rw-r--r--Src/Zle/compcore.c2
-rw-r--r--Src/Zle/compresult.c9
-rw-r--r--Src/Zle/computil.c2
5 files changed, 14 insertions, 12 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]"
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index 640f784c7..6d57b672f 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -1781,7 +1781,7 @@ scanpmgaliases(HashTable ht, ScanFunc func, int flags)
 static void
 scanpmdisgaliases(HashTable ht, ScanFunc func, int flags)
 {
-    scanpmaliases(ht, func, flags, 1, DISABLED);
+    scanaliases(ht, func, flags, 1, DISABLED);
 }
 
 /* Table for defined parameters. */
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 353084fd6..ceee468b0 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -334,7 +334,7 @@ do_completion(Hookdef dummy, Compldat dat)
 
 	    while (1) {
 		if (!first)
-		    acceptlast();
+		    accept_last();
 		first = 0;
 
 		if (!--nm)
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index fe997b12b..70be906db 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1042,7 +1042,7 @@ do_ambig_menu(void)
     } else {
 	if (oldlist) {
 	    if (oldins && minfo.cur)
-		acceptlast();
+		accept_last();
 	} else
 	    minfo.cur = NULL;
     }
@@ -1798,10 +1798,11 @@ printlist(int over, CLPrintFunc printm)
 			    q = skipnolist(q + 1);
 		    mc++;
 		}
-		while (i-- > 0)
-		    printm(g, NULL, mc++, ml, (!i),
+		while (i-- > 0) {
+		    printm(g, NULL, mc, ml, (!i),
 			   (g->widths ? g->widths[mc] : g->width), NULL, NULL);
-
+		    mc++;
+		}
 		if (n) {
 		    putc('\n', shout);
 		    ml++;
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 2b1409fb3..0f8188762 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1035,7 +1035,7 @@ ca_parse_line(Cadef d)
 	    state.optbeg = state.argbeg = state.inopt = cur;
 	    state.singles = (!pe || !*pe);
 
-	    for (p = line + 1; p <= pe; p++) {
+	    for (p = line + 1; p < pe; p++) {
 		if ((tmpopt = d->single[STOUC(*p)])) {
 		    PERMALLOC {
 			state.oargs[tmpopt->num] = newlinklist();