4 ms·
FWIW I get a 503 on that URL. Any chance someone can give me that magic one-liner?
by RustyRussell 4y ago
FWIW I get a 503 on that URL. Any chance someone can give me that magic one-liner?
- jdhendrickson 4y agoNot sure what that link had as it's dead for me as well but... PROMPT_COMMAND='history -a' Has always worked for me. Goes in your .bashrc from the FM PROMPT_COMMAND ¶ If this variable is set, and is an array, the value of each set element is interpreted as a command to execute before printing the primary prompt ($PS1). If this is set but not an array variable, its value is used as a command to execute instead.
- e12e 4y agoLooks like it is still down - but see eg: https://askubuntu.com/questions/67283/is-it-possible-to-make-writing-to-bash-history-immediate#67306 https://askubuntu.com/questions/67283/is-it-possible-to-make... To wit: > It says to put those commands in the .bashrc config: shopt -s histappend PROMPT_COMMAND="history -a;$PROMPT_COMMAND" > The first command changes the history file mode to append and the second configures the history -a command to be run at each shell prompt. The -a option makes history immediately write the current/new lines to the history file. I used to have something like this set up on my Linux laptop - the downside is that seperate shell/terminals/windows/tabs don't keep seperate history - so if you eg start a server in shell one (rails s), start editor in two - then go back to one and ctrl-c out - up arrow will now give you "vim" not "rails s". The problem compounds if you ping, or curl in another shell etc.