From 46372e3a7047a1639e776391553d7cb54d8bca92 Mon Sep 17 00:00:00 2001 From: Sy Le Date: Thu, 16 Nov 2023 07:56:52 -0800 Subject: [PATCH] enhancement to bash history --- bash-profile-barebone.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bash-profile-barebone.sh b/bash-profile-barebone.sh index e3c030b5..1b2b77a5 100644 --- a/bash-profile-barebone.sh +++ b/bash-profile-barebone.sh @@ -6,6 +6,14 @@ 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] " +# Force prompt to write history after every command. +# http://superuser.com/questions/20900/bash-history-loss +PROMPT_COMMAND="history -a; $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