While I have HISTFILESIZE
and HISTSIZE
greater than 500, the bash history gets destroyed after I entered to a "norc" shell. How can I keep the history data through the various shell types?
Here's an actual example.
// on the normal shell (bash)
/mnt/c/pg$ wc ~/.bash_history
876 1997 19855 /home/user/.bash_history
/mnt/c/pg$ logout
PS > bash --noprofile --norc
// on the norc shell
bash-4.4$ wc ~/.bash_history
847 1947 19406 /home/user/.bash_history
// -> notice that .bash_history is trimmed to the default 500 lines. This is the problem.
bash-4.4$ exit
// again on the normal shell
PS > bash
/mnt/c/pg$ wc ~/.bash_history
848 1948 19439 /home/user/.bash_history
// -> once I enter to a norc shell, it affects the entire shell experiences
Here's a part of my .bashrc and .profile
// .bashrc
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite it
// ..
// .profile
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite it
// ..