First of all, this is not a duplicate of any existing threads on SE. I have read these two threads (1st, 2nd) on better bash history, but none of the answers work - - I am on Fedora 15 by the way.
I added the following to the .bashrc file in the user directory (/home/aahan/), and it doesn't work. Anyone has a clue?
HISTCONTROL=ignoredups:erasedups # no duplicate entries
HISTSIZE=1000 # custom history size
HISTFILESIZE=100000 # custom history file size
shopt -s histappend # append to history, don't overwrite it
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" # Save and reload the history after each command finishes
Okay this is what I want with the bash history (priority):
- don't store duplicates, erase any existing ones
- immediately share history with all open terminals
- always append history, not overwrite it
- store multi-line commands as a single command (which is off by default)
- what's the default History size and history file size?