dotfiles/.bashrc

33 lines
714 B
Bash
Raw Normal View History

2021-04-21 19:27:30 +02:00
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Limit max recursion depth
[[ -z "$FUNCNEST" ]] && export FUNCNEST=100
# =====ENVIRONMENT VARIABLES=====
export EDITOR=nvim
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
2021-04-22 10:45:36 +02:00
export INPUTRC="$HOME/.inputrc"
2021-04-21 19:27:30 +02:00
2021-04-21 19:36:08 +02:00
# =====FUNCTIONS=====
function print_status() {
if [[ $1 -ne 0 ]]; then
echo "$1 "
fi
}
2021-04-21 19:27:30 +02:00
# =====PROMPT=====
2021-04-21 19:36:08 +02:00
PS1=" \e[1;31m\$(print_status \$?)\e[1;33m\w\e[m \n \e[1;36m>\e[m "
2021-04-21 19:27:30 +02:00
# =====EXTERNAL SCRIPTS=====
# My aliases
[[ -f "$HOME/.bash_aliases" ]] && source "$HOME/.bash_aliases"
# Broot function
[[ -f "$HOME/.config/broot/launcher/bash/br" ]] && \
source "$HOME/.config/broot/launcher/bash/br"