Post
Ah, `$(history -a)` runs in a subshell, so that value is never reset in the main shell process. The way to go is ```sh declare -a PROMPT_COMMAND PROMPT_COMMAND+=("history -a") ``` Unlike PS0, it would write history only after the command has finished, but I can live with that.
0 reposts0 likes
No replies yet.