Skip to content

Instantly share code, notes, and snippets.

@chsasank
Created February 12, 2024 10:55
Show Gist options
  • Save chsasank/1269d66a798638941a07459f9cdb4410 to your computer and use it in GitHub Desktop.
Save chsasank/1269d66a798638941a07459f9cdb4410 to your computer and use it in GitHub Desktop.

Revisions

  1. chsasank created this gist Feb 12, 2024.
    13 changes: 13 additions & 0 deletions .bashrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    # Eternal bash history.
    # ---------------------
    # Undocumented feature which sets the size to "unlimited".
    # http://stackoverflow.com/questions/9457233/unlimited-bash-history
    export HISTFILESIZE=
    export HISTSIZE=
    export HISTTIMEFORMAT="[%F %T] "
    # Change the file location because certain bash sessions truncate .bash_history file upon close.
    # http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
    export HISTFILE=~/.bash_eternal_history
    # Force prompt to write history after every command.
    # http://superuser.com/questions/20900/bash-history-loss
    PROMPT_COMMAND="history -a; $PROMPT_COMMAND"