Last active
April 23, 2016 01:16
-
-
Save ryenus/ee850aea0f0f910ab240 to your computer and use it in GitHub Desktop.
unlimited bash history
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
HISTSIZE=-1 | |
HISTFILESIZE=-1 | |
#HISTFILE="${HOME}/.history/$(date -u +%Y/%m/%d.%H.%M.%S)_${HOSTNAME_SHORT}_$$" | |
HISTFILE="${HOME}/.history/$(date -d 'last sat +1 day' +%Y/%V/%m.%d)_${HOSTNAME%%.*}" | |
mkdir -p "$(dirname "$HISTFILE")" | |
# other stuff ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This requires GNU
date
command from Homebrew, hencePATH
needs to be set first.