if [[ "$SHELL" == *"bash" ]]; then alias resource="source $HOME/.bash_profile" alias esource="mate -t source.shell $HOME/.bash_profile" elif [[ "$SHELL" == *"/zsh" ]]; then alias resource="source $HOME/.zshrc" ## zsh plugins, these can be installed easily with zplug #if [[ "$(uname)" == "Darwin" ]]; then # plugins=(git common-aliases osx macports textmate anybar) #else # plugins=(git common-aliases) #fi alias esource="mate -t source.shell $HOME/.zshrc" fi alias dotedit="mate -t source.shell $DOTFILES/brethil_dotfile.sh" alias funedit="mate -t source.shell $DOTFILES/functions.sh" alias aledit="mate -t source.shell $DOTFILES/aliases.sh" # Extras functions_file=$DOTFILES/functions.sh # Function definitions aliases_file=$DOTFILES/aliases.sh # Aliases definitions colors_file=$DOTFILES/colors.sh # Colors definitions # Source extras if [ -f $functions_file ]; then source $functions_file; fi if [ -f $aliases_file ]; then source $aliases_file; fi if [ -f $colors_file ]; then source $colors_file; fi ######################## ## Make prompt prettier ###################### if [[ -e $BASH ]]; then export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"' ## This prompt only contains date, username and path, prints a red 'x' when a commands fails #export PS1='[\t][:\w]$(if [[ $? != 0 ]]; then printf "[\[\e[31m\]✗\[\e[0m\]] "; else printf " "; fi)' promptred="\[\033[1;31m\]" promptgreen="\[\033[1;32m\]" promptclear="\[\033[m\]" export PS1="[\t][$promptred\h$promptclear][:$promtgreen\w$promptclear] " ### Other prompt choices: ## This prompt includes includes host name # export PS1='[\t][\h][\u:\w] ' ## This prompt only includes username, date and path #export PS1='[\t][\u:\w] ' fi export EDITOR="mate -w" ### SETUP PATHS #### export PATH=$PATH:$HOME/bin/ export PYTHONPATH=$PYTHONPATH:$HOME/python/:$HOME/bin ## One can also use most pager instead of less to visualize man pages #export PAGER="most"