summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-08-01 16:29:20 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-08-01 16:29:20 +0000
commitc2ed9f96a7772bde53662e668dd3e1876f39a293 (patch)
treed88e90d257a73f65abe42f9268422e4e820e12b0
parent2e70a25d463b42f30aa404a22fca4582d660c0ba (diff)
downloadzsh-c2ed9f96a7772bde53662e668dd3e1876f39a293.tar.gz
zsh-c2ed9f96a7772bde53662e668dd3e1876f39a293.tar.xz
zsh-c2ed9f96a7772bde53662e668dd3e1876f39a293.zip
18920: fix unset IFS betterer
-rw-r--r--ChangeLog10
-rw-r--r--Completion/Base/Core/_main_complete2
-rw-r--r--Src/utils.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 676d8ea30..9b2aca80f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,14 @@
+2003-08-01  Peter Stephenson  <pws@csr.com>
+
+	* 18920: Src/utils.c, Completion/Core/Base/_main_complete: update
+	18916 to use space to join if unset, as per POSIX; set IFS locally
+	in completion just in case.
+
 2003-08-01  Oliver Kiddle  <opk@zsh.org>
 
-	* 189xx: Src/glob.c: fix minor bug with f glob qualifier
+	* 18922: Src/glob.c: fix minor bug with f glob qualifier
 
-	* 18xxx: Completion/Unix/Command/_chmod: new chmod completion
+	* 18921: Completion/Unix/Command/_chmod: new chmod completion
 
 2003-08-01  Peter Stephenson  <pws@csr.com>
 
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete
index c0216a942..b231b994d 100644
--- a/Completion/Base/Core/_main_complete
+++ b/Completion/Base/Core/_main_complete
@@ -3,6 +3,8 @@
 # The main loop of the completion code. This is what is called when 
 # completion is attempted from the command line.
 
+# In case non-standard separators are in use.
+local IFS=$' \t\n\0'
 
 # If you want to complete only set or unset options for the unsetopt
 # and setopt builtin, un-comment these lines:
diff --git a/Src/utils.c b/Src/utils.c
index c83268422..0d9f9f9c3 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2058,6 +2058,8 @@ sepjoin(char **s, char *sep, int heap)
 	if (ifs) {
 	    *p++ = *ifs;
 	    *p++ = *ifs == Meta ? ifs[1] ^ 32 : '\0';
+	} else {
+	    *p++ = ' ';
 	}
 	*p = '\0';
     }