diff options
author | Peter Stephenson <pws@zsh.org> | 2014-06-09 09:50:37 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2014-06-09 09:50:37 +0100 |
commit | 6336347c9e02ebae565b2d62987d1052bcba5567 (patch) | |
tree | c57790ed50fa12ab04733286bd10990d59fb13d0 /Src/hist.c | |
parent | 2ba4aa275e548ae9d4406e3bc8008bdfa1ce29eb (diff) | |
parent | 4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7 (diff) | |
download | zsh-6336347c9e02ebae565b2d62987d1052bcba5567.tar.gz zsh-6336347c9e02ebae565b2d62987d1052bcba5567.tar.xz zsh-6336347c9e02ebae565b2d62987d1052bcba5567.zip |
fix my own merge conflict with grammar changes
Diffstat (limited to 'Src/hist.c')
-rw-r--r-- | Src/hist.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Src/hist.c b/Src/hist.c index 1182994a2..64f88f559 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -935,9 +935,11 @@ hbegin(int dohist) hf = getsparam("HISTFILE"); /* - * For INCAPPENDHISTORY, when interactive, save the history here + * For INCAPPENDHISTORYTIME, when interactive, save the history here * as it gives a better estimate of the times of commands. * + * If INCAPPENDHISTORY is also set we've already done it. + * * If SHAREHISTORY is also set continue to do so in the * standard place, because that's safer about reading and * rewriting history atomically. @@ -950,7 +952,8 @@ hbegin(int dohist) * so that (correctly) nothing happens here. But it shows * I thought about it. */ - if (isset(INCAPPENDHISTORY) && !isset(SHAREHISTORY) && + if (isset(INCAPPENDHISTORYTIME) && !isset(SHAREHISTORY) && + !isset(INCAPPENDHISTORY) && !(histactive & HA_NOINC) && !strin && histsave_stack_pos == 0) savehistfile(hf, 0, HFILE_USE_OPTIONS | HFILE_FAST); } @@ -1378,7 +1381,8 @@ hend(Eprog prog) * For normal INCAPPENDHISTORY case and reasoning, see hbegin(). */ if (isset(SHAREHISTORY) ? histfileIsLocked() : - (isset(INCAPPENDHISTORY) && histsave_stack_pos != 0)) + (isset(INCAPPENDHISTORY) || (isset(INCAPPENDHISTORYTIME) && + histsave_stack_pos != 0))) savehistfile(hf, 0, HFILE_USE_OPTIONS | HFILE_FAST); unlockhistfile(hf); /* It's OK to call this even if we aren't locked */ /* @@ -2542,7 +2546,7 @@ savehistfile(char *fn, int err, int writeflags) } if (writeflags & HFILE_USE_OPTIONS) { if (isset(APPENDHISTORY) || isset(INCAPPENDHISTORY) - || isset(SHAREHISTORY)) + || isset(INCAPPENDHISTORYTIME) || isset(SHAREHISTORY)) writeflags |= HFILE_APPEND | HFILE_SKIPOLD; else histfile_linect = 0; @@ -2578,7 +2582,7 @@ savehistfile(char *fn, int err, int writeflags) tmpfile = NULL; if (err) { if (isset(APPENDHISTORY) || isset(INCAPPENDHISTORY) - || isset(SHAREHISTORY)) + || isset(INCAPPENDHISTORYTIME) || isset(SHAREHISTORY)) zerr("rewriting %s would change its ownership -- skipped", fn); else zerr("rewriting %s would change its ownership -- history not saved", fn); |