From b4a5b9db8b528f9c9b6a9cbb00db381c95659380 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:16:27 +0000 Subject: zsh-3.1.5-pws-9 --- Src/Zle/compctl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Src/Zle/compctl.c') 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"); } /**/ -- cgit 1.4.1