rice/bash/.bashrc

29 lines
522 B
Bash
Raw Normal View History

2021-04-26 15:37:11 +00:00
# exit if not run interactively
[[ $- != *i* ]] && return
2017-12-15 11:01:42 +00:00
shopt -s cdspell checkjobs extglob globstar histappend nocaseglob
HISTCONTROL=erasedups:ignorespace
HISTFILE="$XDG_CACHE_HOME/bash_history"
alias htop='htop -t'
alias mkdir='mkdir -p'
alias rg='rg -S'
t() {
if [[ $1 ]]; then
mkdir -p "/tmp/$1"
fi
cd "/tmp/$1"
}
__prompt() {
case $? in
0) PS1='\[\e[36m\]>> \[\e[0m\]' ;;
*) PS1='\[\e[31m\]>> \[\e[0m\]' ;;
esac
}
PROMPT_COMMAND=__prompt
eval "$(direnv hook bash)"