Created
May 28, 2019 13:05
-
-
Save hernandazevedo/ca6a8222cb66fad6edc1b19c73ed3e30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ANDROID_SDK=/Users/hernand/Library/Android/sdk | |
export ANDROID_NDK=/Users/hernand/Library/Android/sdk/ndk-bundle | |
export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK" | |
# Autocomplete | |
#if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then | |
# . /usr/local/git/contrib/completion/git-completion.bash | |
#fi | |
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" | |
# mostra se existem alterações no projeto (master/branch) | |
GIT_PS1_SHOWDIRTYSTATE=true | |
# necessário para o correto funcionamento da variável ‘__git_ps1’ | |
#source /usr/local/git/contrib/completion/git-prompt.sh | |
# utilizado para escrever o projeto corrente utilizado (master/branch) | |
PS1='\u@\h:\w $(__git_ps1 "(%s)")\$ ' | |
# Setting GIT prompt | |
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` | |
branch_color () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
color="" | |
if git diff --quiet 2>/dev/null >&2 | |
then | |
color=${c_green} | |
else | |
color=${c_red} | |
fi | |
else | |
return 0 | |
fi | |
echo -n $color | |
} | |
parse_git_branch () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
gitver="["$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')"]" | |
else | |
return 0 | |
fi | |
echo -e $gitver | |
} | |
#It's important to escape colors with \[ to indicate the length is 0 | |
PS1='\u@\[${c_red}\]\W\[${c_sgr0}\]\[\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]$ ' |
export JAVA_HOME="/Users/hernand.azevedo/jdk/jdk-11.0.11.jdk/Contents/Home"
export FLUTTER_HOME="/Users/hernand.azevedo/development/flutter"
export ANDROID_HOME="/Users/hernand.azevedo/Library/Android/sdk"
export OS_CLI_HOME="/Users/hernand.azevedo/.os"
export PATH="$PATH:$FLUTTER_HOME/bin:$JAVA_HOME/bin:$FLUTTER_HOME/.pub-cache/bin:$ANDROID_HOME/platform-tools:$OS_CLI_HOME/bin"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create the folder structure to work with big sur
mkdir -p ~/.zsh
cd ~/.zsh
Download the scripts
curl -o git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
curl -o _git https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh
Also install
https://github.com/zsh-git-prompt/zsh-git-prompt
put these on ~/.zshrc file