about summary refs log tree commit diff
path: root/Src/Zle/compctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/compctl.c')
-rw-r--r--Src/Zle/compctl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index cec71fc5b..e3b778508 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -1685,6 +1685,10 @@ bin_compadd(char *name, char **argv, char *ops, int func)
 	return 1;
     }
     for (; *argv && **argv ==  '-'; argv++) {
+	if (!(*argv)[1]) {
+	    argv++;
+	    break;
+	}
 	for (p = *argv + 1; *p; p++) {
 	    sp = NULL;
 	    dm = 0;
@@ -1945,9 +1949,9 @@ restrict_range(int b, int e)
     pparams = p;
     zsfree(compcontext);
     if ((compcurrent -= b + 1))
-	compcontext = ztrdup("arg");
+	compcontext = ztrdup("argument");
     else
-	compcontext = ztrdup("cmd");
+	compcontext = ztrdup("command");
 }
 
 /**/