Re:Ask HN: What do you love/hate about terminals? Would you ...
by chainsaw10 on Wednesday December 27, 2017 @02:34PM
(#16017307)
You can do something similar with bash. If you set PROMPT_COMMAND='history -a', it'll append to the history file right after the command completes (because the prompt command is run as the prompt is printed).
Re:Ask HN: What do you love/hate about terminals? Would you ...
by baq on Thursday December 28, 2017 @03:20PM
(#16024619)
thanks, i'm sure you've just saved a couple hours for a future me :)
Re:Ask HN: What do you love/hate about terminals? Would you ...
by foobarian on Wednesday December 27, 2017 @11:31AM
(#16015721)
I use an eternal history setup for bash, with bash session tags that let me sort history by tag for correct backward-search behavior.
(edit) Not to imply this functionality belongs to a terminal, far from it. But it's nice to have access to 2 years of shell commands :-)
zsh does (has an option to) commit commands to the history file immediately when you execute the command. Makes me hate bash even more when I have to use it occasionally on a server.