about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2000-07-19 20:42:37 +0000
committerWayne Davison <wayned@users.sourceforge.net>2000-07-19 20:42:37 +0000
commit9e7b3f1d255a132a5cb3c4627ff9b3b6626b1e56 (patch)
tree608bdf53e406dee0f3bf08ecc22d7f0bd4ba41e6 /Src/lex.c
parenteaea5cc0db2fb98fd5fd5d74b840e9e1092f6e8e (diff)
downloadzsh-9e7b3f1d255a132a5cb3c4627ff9b3b6626b1e56.tar.gz
zsh-9e7b3f1d255a132a5cb3c4627ff9b3b6626b1e56.tar.xz
zsh-9e7b3f1d255a132a5cb3c4627ff9b3b6626b1e56.zip
If an alias starts with a space, set aliasspaceflag to 1 instead of
calling remhist().
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 2aec25678..9fc4ddae1 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1561,9 +1561,8 @@ exalias(void)
 	    if (an && !an->inuse && ((an->flags & ALIAS_GLOBAL) || incmdpos ||
 				     inalmore)) {
 		inpush(an->text, INP_ALIAS, an);
-		/* remove from history if it begins with space */
-		if (isset(HISTIGNORESPACE) && an->text[0] == ' ')
-		    remhist();
+		if (an->text[0] == ' ')
+		    aliasspaceflag = 1;
 		lexstop = 0;
 		if (yytext == copy)
 		    yytext = tokstr;