about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-04-28 08:55:35 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-04-28 08:55:35 +0000
commitedc01c0455e894f0ba3ff1caa5b545110271d3ac (patch)
treeb20cb1d67c9788a0a5fff227f3b73366a2d13889
parent443d873258f7749c32813073dc8b508ab6f08a7a (diff)
downloadzsh-edc01c0455e894f0ba3ff1caa5b545110271d3ac.tar.gz
zsh-edc01c0455e894f0ba3ff1caa5b545110271d3ac.tar.xz
zsh-edc01c0455e894f0ba3ff1caa5b545110271d3ac.zip
Mikael: 27929 + doc: global aliases shouldn't trigger HIST_IGNORE_SPACE
-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)