1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-13 23:31:08 +02:00

- Call saveandpophiststack() with its new writeflags arg.

- Use the new HFILE_NO_REWRITE flag when saving the history
  file after a signal was received.
This commit is contained in:
Wayne Davison 2004-10-01 19:48:44 +00:00
parent 0c77a8e876
commit 2e4db343c6

View file

@ -1340,7 +1340,7 @@ bin_fc(char *nam, char **argv, Options ops, int func)
zwarnnam("fc", "too many arguments", NULL, 0); zwarnnam("fc", "too many arguments", NULL, 0);
return 1; return 1;
} }
return !saveandpophiststack(-1); return !saveandpophiststack(-1, HFILE_USE_OPTIONS);
} }
/* with the -m option, the first argument is taken * /* with the -m option, the first argument is taken *
* as a pattern that history lines have to match */ * as a pattern that history lines have to match */
@ -4111,8 +4111,11 @@ zexit(int val, int from_where)
} }
if (isset(RCS) && interact) { if (isset(RCS) && interact) {
if (!nohistsave) { if (!nohistsave) {
saveandpophiststack(1); int writeflags = HFILE_USE_OPTIONS;
savehistfile(NULL, 1, HFILE_USE_OPTIONS); if (from_where == 1)
writeflags |= HFILE_NO_REWRITE;
saveandpophiststack(1, writeflags);
savehistfile(NULL, 1, writeflags);
} }
if (islogin && !subsh) { if (islogin && !subsh) {
sourcehome(".zlogout"); sourcehome(".zlogout");