Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Mehta committed May 12, 2020
1 parent 047f2c3 commit a35653e
Showing 1 changed file with 17 additions and 37 deletions.
54 changes: 17 additions & 37 deletions .bash_profile
Original file line number Diff line number Diff line change
@@ -1,50 +1,30 @@
alias ll="ls -al"
alias ll="ls -alh"
alias gw="./gradlew"
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
source ~/.git-completion.bash
source ~/.bashrc
export PATH=~/anaconda/bin:$PATH
#alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code"
#alias gvim="/Applications/MacVim.app/Contents/bin/gvim"
#alias vim="gvim"
alias yarnblitz='(find . -type d -name 'node_modules' -maxdepth 3 | xargs rm -rf) && yarn'
alias cleanbuild='lerna run clean --parallel && yarn && yarn build'
#alias dockerblitz='docker rm $(docker ps -a -q)'
#alias dockerstop='docker stop $(docker ps -a -q)'
alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code"
alias yarnblitz='(find . -type d -name 'node_modules' -maxdepth 3 | xargs rm -rf) && yarn --ignore-engines'
alias cleanbuild='lerna run clean --parallel && yarn --ignore-engines && yarn build'
alias dockerblitz='docker rm $(docker ps -a -q)'
alias dockerstop='docker stop $(docker ps -a -q)'
alias git-purge='git branch --merged | grep -v "\*" | grep -v "master" | grep -v "develop" | grep -v "staging" | xargs -n 1 git branch -d'
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}


COLOR_RED="\033[0;31m"
COLOR_YELLOW="\033[0;33m"
COLOR_GREEN="\033[0;32m"
COLOR_OCHRE="\033[38;5;95m"
COLOR_BLUE="\033[0;34m"
COLOR_WHITE="\033[0;37m"
COLOR_RESET="\033[0m"

function git_color {
local git_status="$(git status 2> /dev/null)"

if [[ ! $git_status =~ "working directory clean" ]]; then
echo -e $COLOR_RED
elif [[ $git_status =~ "Your branch is ahead of" ]]; then
echo -e $COLOR_YELLOW
elif [[ $git_status =~ "nothing to commit" ]]; then
echo -e $COLOR_GREEN
else
echo -e $COLOR_OCHRE
fi
}

export JAVA_HOME=$(/usr/libexec/java_home)

export PS1="[\A, \u,\$(parse_git_branch)] \w$ "
alias did="vim +'normal Go' +'r!date' ~/did.txt"
export PATH="${HOME}/.config/yarn/global/node_modules/.bin:$PATH"

export PATH="/usr/local/opt/[email protected]/bin:$PATH"

export PATH="/usr/local/bin/mongodb/bin:$PATH"
export PATH="/Library/Frameworks/R.framework/Resources/bin:$PATH"
export JAVA_HOME=$(/usr/libexec/java_home)
#ssh-add -K ~/.ssh/id_rsa_gh 2> /dev/null
# Powerline
function _update_ps1() {
PS1=$(powerline-shell $?)
}

if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

0 comments on commit a35653e

Please sign in to comment.