29 lines
948 B
Plaintext

export HISTCONTROL=ignoredups:ignorespace
export HISTSIZE=5000
export HISTFILESIZE=5000
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# From https://twitter.com/ahakcil/status/1230854797613522944
ps1_state(){
ret=$?
if [ $ret -eq 0 ]; then
echo -e "[$(date +%H:%M:%S)]\xF0\x9F\x94\xA5"
else
echo -e "[$(date +%H:%M:%S)]\xF0\x9F\x94\xB4->$ret "
fi
}
export PS1='${debian_chroot:+($debian_chroot)}$(ps1_state)\[\033[01;31m\]\u\[\033[00m\][ \[\033[01;34m\]\w\[\033[00m\] ]\$ '
# From https://twitter.com/n00py1/status/1230755337797394434
script -f /logs/$(date +"%d-%b-%y_%H-%M-%S")_shell.log