.bash_history for multiple windows

Asked by Morons

I'd like to see proper handeling and history from multiple windows handled correctly, It is frustrating to "lose" history log for commande executed plainly because 2 or more she is active.

Please can you incorporate this

ITMT: Can someone point me to an Alternative solution ?

Thanx

Question information

Language:
English Edit question
Status:
Answered
For:
byobu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dustin Kirkland  (kirkland) said :
#1

Try this... Add these two lines to your $HOME/.bashrc:

shopt -s histappend
PROMPT_COMMAND="$PROMPT_COMMAND;history -a"

If this works, I can look into getting this fixed properly...

Revision history for this message
Morons (morons) said :
#2

I now do get an error

bash: PROMPT_COMMAND: line 1: syntax error near unexpected token `;'
bash: PROMPT_COMMAND: line 1: `;history -a'

Revision history for this message
Dustin Kirkland  (kirkland) said :
#3

Try this instead in ~/.bashrc:

shopt -s histappend
[ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history
-a" || PROMPT_COMMAND="history -a"

Can you help with this problem?

Provide an answer of your own, or ask Morons for more information if necessary.

To post a message you must log in.