about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Doc/Zsh/options.yo3
-rw-r--r--Src/lex.c2
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index be3b5ed38..c23ef3f1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-28  Peter Stephenson  <pws@csr.com>
+
+	* Mikael: 27929: Src/lex.c, Doc/Zsh/options.yo (added pws): global
+	aliases with space shouldn't trigger HIST_IGNORE_SPACE.
+
 2010-04-27  Peter Stephenson  <pws@csr.com>
 
 	* 27926: Src/Zle/zle_hist.c: fix completion suffix when inserting
@@ -13081,5 +13086,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4968 $
+* $Revision: 1.4969 $
 *****************************************************
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 23989c76b..e77ead1d5 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -829,7 +829,8 @@ cindex(history, ignoring spaces)
 item(tt(HIST_IGNORE_SPACE) (tt(-g)))(
 Remove command lines from the history list when the first character on
 the line is a space, or when one of the expanded aliases contains a
-leading space.
+leading space.  Only normal aliases (not global or suffix aliases)
+have this behaviour.
 Note that the command lingers in the internal history until the next
 command is entered before it vanishes, allowing you to briefly reuse
 or edit the line.  If you want to make it vanish right away without
diff --git a/Src/lex.c b/Src/lex.c
index 8f432515c..83257da8c 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1774,7 +1774,7 @@ exalias(void)
 		if (an && !an->inuse &&
 		    ((an->node.flags & ALIAS_GLOBAL) || incmdpos || inalmore)) {
 		    inpush(an->text, INP_ALIAS, an);
-		    if (an->text[0] == ' ')
+		    if (an->text[0] == ' ' && !(an->node.flags & ALIAS_GLOBAL))
 			aliasspaceflag = 1;
 		    lexstop = 0;
 		    if (zshlextext == copy)