about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-27 08:32:02 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-27 08:32:02 +0000
commitd3ceb5e0eb499a9a6b0778e3ae1e68e6b4758aff (patch)
tree0712f70416bb070d8178f4cda7ce9c25f1cdeb1b
parent8ffa3c17cf113340bce4133222edfa3d4a138d2d (diff)
downloadzsh-d3ceb5e0eb499a9a6b0778e3ae1e68e6b4758aff.tar.gz
zsh-d3ceb5e0eb499a9a6b0778e3ae1e68e6b4758aff.tar.xz
zsh-d3ceb5e0eb499a9a6b0778e3ae1e68e6b4758aff.zip
compdescribe shouldn't use the sets after failed initialisation
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/computil.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f34392a6..e9be943e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
 
 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
  	completions if there is only one and at the same time messages are
  	shown
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index ae3238428..54c2a0f19 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -115,6 +115,7 @@ cd_init(char *nam, char *sep, char **args, int disp)
     if (cd_parsed) {
 	zsfree(cd_state.sep);
 	freecdsets(cd_state.sets);
+	cd_parsed = 0;
     }
     setp = &(cd_state.sets);
     cd_state.sep = ztrdup(sep);
@@ -153,6 +154,7 @@ cd_init(char *nam, char *sep, char **args, int disp)
 	if ((*args = tmp))
 	    args++;
     }
+    cd_parsed = 1;
     return 0;
 }
 
@@ -259,10 +261,8 @@ bin_compdescribe(char *nam, char **args, char *ops, int func)
     }
     switch (args[0][1]) {
     case 'i':
-	cd_parsed = 1;
 	return cd_init(nam, "", args + 1, 0);
     case 'I':
-	cd_parsed = 1;
 	return cd_init(nam, args[1], args + 2, 1);
     case 'g':
 	if (cd_parsed) {