From a2b296a5de14c533a4ccd887b72901a2bcc96acd Mon Sep 17 00:00:00 2001 From: "Adam A.G. Shamblin" Date: Tue, 24 Jun 2014 14:43:25 -0600 Subject: [PATCH] Bash profile cleanup, comments. --- dotbash_profile | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/dotbash_profile b/dotbash_profile index f8528b0..fc5db92 100644 --- a/dotbash_profile +++ b/dotbash_profile @@ -6,11 +6,11 @@ export ANDROID_PATH=/Applications/Android\ Studio.app/sdk/platform-tools:/Applic export POSTGRES_PATH=/Applications/Postgres.app/Contents/Versions/9.3/bin export PATH=~/bin:/usr/local/bin:$PATH:$GRADLE_HOME/bin:$ANDROID_PATH:$POSTGRES_PATH -YELLOW=$(tput setaf 136); -ORANGE=$(tput setaf 166); -GREEN=$(tput setaf 64); -BASE2=$(tput setaf 254); -RESET=$(tput sgr0); +################################################## +# +# Bash Completion Scripts +# +################################################## if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then . /usr/local/git/contrib/completion/git-completion.bash @@ -20,7 +20,18 @@ if [ -f /usr/local/etc/bash_completion.d/rabbitmqadmin.bash ]; then . /usr/local/etc/bash_completion.d/rabbitmqadmin.bash fi -# Change the prompt character when encountering git repositories +################################################## +# +# Command Prompt Customizations +# +################################################## + +YELLOW=$(tput setaf 136); +ORANGE=$(tput setaf 166); +GREEN=$(tput setaf 64); +BASE2=$(tput setaf 254); +RESET=$(tput sgr0); + function prompt_char { if ! git rev-parse --git-dir > /dev/null 2>&1; then echo '$' @@ -32,6 +43,12 @@ function prompt_char { } export PS1='\[$ORANGE\]\u\[$RESET\] @ \[$YELLOW\]\h\[$RESET\] in \[$GREEN\]\w\[$RESET\]\n\[$BASE2\]$(prompt_char)\[$RESET\] ' +################################################## +# +# Python Virtual Environments & Completion +# +################################################## + function activate () { command source $PYTHON_ENV_PATH/$1/bin/activate } @@ -52,7 +69,19 @@ function _envdir () { } complete -F _envdir activate +################################################## +# +# Ruby Stuffs +# +################################################## + [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* +################################################## +# +# Aliases +# +################################################## + alias git=/usr/local/git/bin/git alias preview="open -a Preview" -- 2.39.5