Skip to content

Commit

Permalink
enhancement to bash history
Browse files Browse the repository at this point in the history
  • Loading branch information
synle committed Nov 16, 2023
1 parent 6ccb8d4 commit 35fde55
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bash-profile-barebone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ export BASH_PATH=~/.bashrc
# add sbin to path
export PATH=$PATH:/sbin

# increase history size
export HISTSIZE=5000
export HISTFILESIZE=10000
export HISTTIMEFORMAT="[%F %T] "
# https://unix.stackexchange.com/questions/18212/bash-history-ignoredups-and-erasedups-setting-conflict-with-common-history
HISTCONTROL=ignoredups:erasedups
shopt -s histappend
PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"

# os flags
export is_os_darwin_mac=0 && [ -d /Applications ] && export is_os_darwin_mac=1
export is_os_window=0 && [ -d /mnt/c/Users ] && export is_os_window=1
Expand Down

0 comments on commit 35fde55

Please sign in to comment.