Skip to content

Does OhMyBash change/flush my .bash_history by default? #570

Answered by akinomyoga
mehdiMj-ir asked this question in Q&A
Discussion options

You must be logged in to vote

Does OhMyBash change/flush my .bash_history by default?

No. By default, Oh My Bash configures the unlimited history size by setting empty strings to HISTSIZE and HISTFILESIZE.

what should I do?

What would you like to achieve?

  • If you don't want to flush ~/.bash_history, you don't have to do anything. Oh My Bash sets empty strings to HISTSIZE and HISTFILESIZE so the history will not be truncated.
    Or, even if you don't touch HISTSIZE and HISTFILESIZE at all, is your ~/.bash_history truncated? In such a case, what is the result of the command declare -p HISTSIZE HISTFILESIZE in an interactive session?
  • If you want to truncate ~/.bash_history, you need to set HISTSIZE and HISTFILESIZE to the

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mehdiMj-ir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants