0

For some reason I get a bash history file in each and every folder where I issue any command. The file is called history rather than the normal .bash_history.

My .bash_profile has the following that affects history.

45 shopt -s histappend
46 PROMPT_COMMAND="$PROMPT_COMMAND history -a"

I'm using GNU bash, version 4.3.30(1)-release installed on Mac via Homebrew.

[edit] I just noticed that I only get the file when running in screen

1

It looks like you are missing a semicolon, try changing it to this PROMPT_COMMAND="history -a; $PROMPT_COMMAND"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.