Last active
January 15, 2019 12:17
-
-
Save lerox/762356e26aec3a2b40b2 to your computer and use it in GitHub Desktop.
Custom bashrc to use git-prompt and git-completion on command-line interface (cli)
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
# ~/.custombashrc | |
# Put this file to be included by ~/.bashrc | |
# https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash | |
source ~/.git-completion.sh | |
# https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh | |
source ~/.git-prompt.sh | |
GIT_PS1_SHOWDIRTYSTATE=true | |
# GIT_PS1_SHOWUPSTREAM="auto" | |
GIT_PS1_SHOWCOLORHINTS=true | |
# GIT_PS1_SHOWUNTRACKEDFILES=true | |
# GIT_PS1_SHOWSTASHSTATE=true | |
PROMPT_COMMAND="__git_ps1 '\u@\h:\w' '\\$ ' ' [%s]' " | |
# pbcopy | |
alias pbcopy='xclip -selection clipboard' | |
alias pbpaste='xclip -selection clipboard -o' | |
# docker aliases | |
alias dc=docker-compose | |
# weather | |
alias tempo="curl -4 http://wttr.in?Sao_Paulo" | |
alias weather=tempo |
Example: vagrant@precise32:/vagrant/project [branch_name *]$
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unstaged (*) and staged (+) changes will also be shown next to the branch name.