This commit is contained in:
tg
2008-09-30 19:28:12 +00:00
parent 13231b50eb
commit 051522c9ea
2 changed files with 7 additions and 9 deletions

10
lex.c
View File

@@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.70 2008/09/30 19:25:51 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.71 2008/09/30 19:28:12 tg Exp $");
/*
* states while lexing word
@@ -1239,11 +1239,9 @@ getsc_line(Source *s)
if (s->type == SFILE)
shf_fdclose(s->u.shf);
s->str = NULL;
} else if (interactive) {
char *p = Xstring(s->xs, xp);
if (*p && (cur_prompt != PS1 || !ctype(*p, C_IFS | C_IFSWS))) {
histsave(&s->line, s->str, true, true);
}
} else if (interactive && *s->str &&
(cur_prompt != PS1 || !ctype(*s->str, C_IFS | C_IFSWS))) {
histsave(&s->line, s->str, true, true);
}
if (interactive)
set_prompt(PS2, NULL);