Thursday | 21 NOV 2024
[ previous ]
[ next ]

Infinite Bash History

Title:
Date: 2022-11-04
Tags:  

These are my notes to enable infinite bash history. Extremely useful when tied together with fzf.

Simply add the following 2 options to your ~/.bashrc.

export HISTSIZE=
export HISTFILESIZE=

Above these you can also add:

This way duplicated lines, and lines starting with space will be ignored.

HISTCONTROL=ignoreboth

History will also be append only so you won't accidentally clobber your history by having multiple sessions.

shopt -s histappend

This will timestamp commands.

export HISTTIMEFORMAT="%F %T "