Last active
December 26, 2016 20:37
-
-
Save cmsouza/36afe2307a2ea83d750e to your computer and use it in GitHub Desktop.
Bash prompts marotos
This file contains 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
# no seu bashrc | |
if [ ! -f ~/.bash-gitprompt.sh ]; then | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.bash-gitprompt.sh | |
fi | |
source ~/.bash-gitprompt.sh | |
PS1='\[\033]0;\u@\h:\W\007\]`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \[\033[01;37m\]\u@\h\[\033[01;34m\] \w\[\033[35m\]$(__git_ps1 " %s") \[\033[01;36m\]$\[\033[00m\] ' | |
# no do root | |
PS1='\[\033]0;\u@\h:\W\007\]`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \[\033[01;30m\]\u@\h\[\033[01;34m\] \w\[\033[35m\] \[\033[01;31m\]#\[\033[00m\] ' | |
# nas vms | |
PS1='\[\033]0;\u@\h:\W\007\]`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \[\033[01;33m\]\u@\h\[\033[01;34m\] \w\[\033[35m\] \[\033[01;30m\]$\[\033[00m\] ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment