Skip to content

Instantly share code, notes, and snippets.

@dmnugent80
Last active September 27, 2024 15:33
Show Gist options
  • Save dmnugent80/7d662992f8cbc04bb814c0cf117ab18c to your computer and use it in GitHub Desktop.
Save dmnugent80/7d662992f8cbc04bb814c0cf117ab18c to your computer and use it in GitHub Desktop.
export ANDROID_HOME="$HOME/Library/Android/sdk"
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
#export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home
# reloads the prompt, usefull to take new modifications into account
alias reload="source ~/.bash_profile"
#alias pull="git smart-pull"
#alias push="git push origin master"
alias log="adb logcat -v time"
alias logd="adb logcat -v time | egrep ‘<>’"
alias cd..='cd ../' # Go back 1 directory level (for fast typers)
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
alias .4='cd ../../../../' # Go back 4 directory levels
alias .5='cd ../../../../../' # Go back 5 directory levels
alias .6='cd ../../../../../../' # Go back 6 directory levels
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
git_branch_for_prompt() {
GIT_BRANCH=`parse_git_branch`
if [[ -n "$GIT_BRANCH" ]] ; then echo "($GIT_BRANCH)"; fi
}
repertoire_courant() {
pwd
}
PS1="\$(repertoire_courant)\$(git_branch_for_prompt)> "
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment