3 ms·
> [1] eg. putting history -a in PROMPT_COMMAND as the article recommends appends your session's entire history each time, IIRC. No, only the last command. Ver
by jackewiehose 7y ago
> [1] eg. putting history -a in PROMPT_COMMAND as the article recommends appends your session's entire history each time, IIRC.
No, only the last command. Very handy because that way you can start a
new terminal and have your current history available immediately. I
also have an alias r='history -n'. With this you can load the history
of another terminal session directly into the current session.
- kbd 7y agoJust tested it and 'history -a' behaves how you say. Maybe it was an older version of bash that had this behavior. Edit: now I'm obsessing about reproducing this behavior from years ago! If anyone knows what I'm talking about I'd be grateful for some validation :)