52 lines
743 B
Bash
Raw Permalink Normal View History

2018-03-01 00:47:14 +01:00
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
#set dircolor to solarized-dark
#eval `dircolors ~/.dotfiles/gnome-terminal/dircolors-solarized/dircolors.ansi-dark`
#export PATH=~/bin:$PATH
export EDITOR="nvim"
#
# load aliases
#
source ~/.config/aliases
# add ruby to path
#PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
#
# Prompt
#
exitstatus()
{
if [[ $? == 0 ]]; then
#echo -e ''
echo -e '\033[0;32m➜\033[0m '
2018-03-01 00:47:14 +01:00
else
#echo -e '\033[0;31m✗ '
echo -e '\033[0;31m➜\033[0m '
2018-03-01 00:47:14 +01:00
fi
}
user()
{
if [[ $USER == 'roman' ]]; then
echo -e ''
2018-03-01 00:47:14 +01:00
else
echo -e '\u@\h '
2018-03-01 00:47:14 +01:00
fi
}
#PS1='[$(exitstatus)$(user)\w]\$ '
PS1='$(exitstatus) \[\033[1;36m\]\W\[\033[0m\] '