diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-07-25 08:52:34 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-07-25 08:52:34 +0000 |
commit | eba59194d72250402bdbb97a866ffea89ec9d7a7 (patch) | |
tree | 607dc8f64428fb9f749405c96e7c3e7969739cce /Src/Zle/complete.c | |
parent | 6d81779954a9a5ef64c87a21ce131190a1214d7c (diff) | |
download | zsh-eba59194d72250402bdbb97a866ffea89ec9d7a7.tar.gz zsh-eba59194d72250402bdbb97a866ffea89ec9d7a7.tar.xz zsh-eba59194d72250402bdbb97a866ffea89ec9d7a7.zip |
make display for groups in _describe nicer; improve packing with list_packed; leave space for type character (list_types) only in groups with at least one file name (15477)
Diffstat (limited to 'Src/Zle/complete.c')
-rw-r--r-- | Src/Zle/complete.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c index 574e638ac..106e0ddab 100644 --- a/Src/Zle/complete.c +++ b/Src/Zle/complete.c @@ -435,6 +435,7 @@ bin_compadd(char *name, char **argv, char *ops, int func) dat.match = NULL; dat.flags = 0; dat.aflags = CAF_MATCH; + dat.dummies = 0; for (; *argv && **argv == '-'; argv++) { if (!(*argv)[1]) { @@ -565,6 +566,23 @@ bin_compadd(char *name, char **argv, char *ops, int func) case 'l': dat.flags |= CMF_DISPLINE; break; + case 'E': + if (p[1]) { + dat.dummies = atoi(p + 1); + p = "" - 1; + } else if (argv[1]) { + argv++; + dat.dummies = atoi(*argv); + p = "" - 1; + } else { + zwarnnam(name, "number expected after -%c", NULL, *p); + return 1; + } + if (dat.dummies < 0) { + zwarnnam(name, "invalid number: %d", NULL, dat.dummies); + return 1; + } + break; case '-': argv++; goto ca_args; |