bashrc history stuff

This commit is contained in:
nold 2024-01-04 16:28:24 +01:00
parent c12b43a795
commit c29c5325b3

18
bashrc
View file

@ -1,6 +1,10 @@
source /etc/profile 2>/dev/null source /etc/profile 2>/dev/null
source /etc/profile.d/* 2>/dev/null source /etc/profile.d/* 2>/dev/null
if [ -e /usr/bin/gnome-keyring-daemon ] ; then
source <(/usr/bin/gnome-keyring-daemon --start --components=ssh)
fi
# Change prompt if root # Change prompt if root
if [ $UID -eq 0 ] ; then if [ $UID -eq 0 ] ; then
PROMPT_SUFFIX='\[\033[1;31m\] # \[\033[0m\]' PROMPT_SUFFIX='\[\033[1;31m\] # \[\033[0m\]'
@ -42,12 +46,16 @@ export TERM=xterm-256color
export MC_SKIN=$HOME/.mc/lib/solarized.ini export MC_SKIN=$HOME/.mc/lib/solarized.ini
# Better History # Better History
HISTFILE=~/.bash_history export HISTFILE=~/.bash_history
HISTSIZE=100000 export HISTSIZE=10000000
HISTTIMEFORMAT="%F %T " export HISTFILESIZE=10000000
HISTCONTROL='ignorespace:ignoredups' export HISTTIMEFORMAT="%F %T "
HISTIGNORE='l:ls:history' export HISTCONTROL='ignorespace:ignoredups'
export HISTIGNORE='l:ls:history'
# Don't render ![0-9] as previous command
set +o histexpand
# append to history, don't overwrite it # append to history, don't overwrite it
shopt -s histappend shopt -s histappend
# attempt to save all lines of a multiple-line command in the same history entry # attempt to save all lines of a multiple-line command in the same history entry