1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-11 13:01:28 +02:00

compdescribe shouldn't use the sets after failed initialisation

This commit is contained in:
Sven Wischnowsky 2000-07-27 08:32:02 +00:00
parent 8ffa3c17cf
commit d3ceb5e0eb
2 changed files with 5 additions and 2 deletions

View file

@ -5,6 +5,9 @@
2000-07-27 Sven Wischnowsky <wischnow@zsh.org> 2000-07-27 Sven Wischnowsky <wischnow@zsh.org>
* 12400: Src/Zle/computil.c: compdescribe shouldn't use the sets
after failed initialisation
* 12394: Completion/Core/_main_complete: don't hide possible * 12394: Completion/Core/_main_complete: don't hide possible
completions if there is only one and at the same time messages are completions if there is only one and at the same time messages are
shown shown

View file

@ -115,6 +115,7 @@ cd_init(char *nam, char *sep, char **args, int disp)
if (cd_parsed) { if (cd_parsed) {
zsfree(cd_state.sep); zsfree(cd_state.sep);
freecdsets(cd_state.sets); freecdsets(cd_state.sets);
cd_parsed = 0;
} }
setp = &(cd_state.sets); setp = &(cd_state.sets);
cd_state.sep = ztrdup(sep); cd_state.sep = ztrdup(sep);
@ -153,6 +154,7 @@ cd_init(char *nam, char *sep, char **args, int disp)
if ((*args = tmp)) if ((*args = tmp))
args++; args++;
} }
cd_parsed = 1;
return 0; return 0;
} }
@ -259,10 +261,8 @@ bin_compdescribe(char *nam, char **args, char *ops, int func)
} }
switch (args[0][1]) { switch (args[0][1]) {
case 'i': case 'i':
cd_parsed = 1;
return cd_init(nam, "", args + 1, 0); return cd_init(nam, "", args + 1, 0);
case 'I': case 'I':
cd_parsed = 1;
return cd_init(nam, args[1], args + 2, 1); return cd_init(nam, args[1], args + 2, 1);
case 'g': case 'g':
if (cd_parsed) { if (cd_parsed) {