From c82ce14950c327d45fe8a1dfece0f883a420641a Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 11 Mar 2016 22:18:11 +0000 Subject: 38135: internal: bin_compadd: Add a few comments. --- Src/Zle/complete.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Src/Zle/complete.c') diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c index ee4e5b0a5..30fab541a 100644 --- a/Src/Zle/complete.c +++ b/Src/Zle/complete.c @@ -704,15 +704,18 @@ bin_compadd(char *name, char **argv, UNUSED(Options ops), UNUSED(int func)) } if (sp) { if (p[1]) { + /* Pasted argument: -Xfoo. */ if (!*sp) *sp = p + 1; p = "" - 1; } else if (argv[1]) { + /* Argument in a separate word: -X foo. */ argv++; if (!*sp) *sp = *argv; p = "" - 1; } else { + /* Missing argument: argv[N] == "-X", argv[N+1] == NULL. */ zwarnnam(name, e, *p); zsfree(mstr); return 1; -- cgit 1.4.1