mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-07 09:21:18 +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:
parent
0c77a8e876
commit
2e4db343c6
1 changed files with 6 additions and 3 deletions
|
@ -1340,7 +1340,7 @@ bin_fc(char *nam, char **argv, Options ops, int func)
|
|||
zwarnnam("fc", "too many arguments", NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
return !saveandpophiststack(-1);
|
||||
return !saveandpophiststack(-1, HFILE_USE_OPTIONS);
|
||||
}
|
||||
/* with the -m option, the first argument is taken *
|
||||
* as a pattern that history lines have to match */
|
||||
|
@ -4111,8 +4111,11 @@ zexit(int val, int from_where)
|
|||
}
|
||||
if (isset(RCS) && interact) {
|
||||
if (!nohistsave) {
|
||||
saveandpophiststack(1);
|
||||
savehistfile(NULL, 1, HFILE_USE_OPTIONS);
|
||||
int writeflags = HFILE_USE_OPTIONS;
|
||||
if (from_where == 1)
|
||||
writeflags |= HFILE_NO_REWRITE;
|
||||
saveandpophiststack(1, writeflags);
|
||||
savehistfile(NULL, 1, writeflags);
|
||||
}
|
||||
if (islogin && !subsh) {
|
||||
sourcehome(".zlogout");
|
||||
|
|
Loading…
Reference in a new issue