bash: git prompt configuration
pré-commande bash couleur info stash, untrack, branch
This commit is contained in:
parent
540d78dac2
commit
45de81964c
17
_bashrc
17
_bashrc
@ -32,8 +32,7 @@ xterm-color)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Comment in the above and uncomment this below for a color prompt
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[0;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\n\$ '
|
||||
# Prompt
|
||||
PS1="\[\033[1;31m\]>> \[\033[01;37m\](\[\033[0;37m\]\u@\[\033[0;32m\]\h\[\033[01;37m\]) \[\033[01;34m\]\w\[\033[00m\]\n\[\033[1;31m\]>>\[\033[0;37m\] "
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
@ -98,3 +97,17 @@ export YDL_TARGET=$HOME
|
||||
if [ -f ~/.bashrc_$(hostname -s) ]; then
|
||||
. ~/.bashrc_$(hostname -s)
|
||||
fi
|
||||
|
||||
# git
|
||||
if [ -e /usr/local/share/git-core/contrib/completion/git-completion.bash ]; then
|
||||
. /usr/local/share/git-core/contrib/completion/git-completion.bash
|
||||
fi
|
||||
if [ -e /usr/local/share/git-core/contrib/completion/git-prompt.sh ]; then
|
||||
. /usr/local/share/git-core/contrib/completion/git-prompt.sh
|
||||
export GIT_PS1_SHOWDIRTYSTATE=1
|
||||
export GIT_PS1_SHOWSTASHSTATE=1
|
||||
export GIT_PS1_SHOWUNTRACKEDFILES=1
|
||||
export GIT_PS1_SHOWUPSTREAM="auto"
|
||||
export GIT_PS1_SHOWCOLORHINTS=1
|
||||
export PROMPT_COMMAND='__git_ps1 "\[\033[1;31m\]>> \[\033[01;37m\](\[\033[0;37m\]\u@\[\033[0;32m\]\h\[\033[01;37m\]) \[\033[01;34m\]\w\[\033[00m\]" "\n\[\033[1;31m\]>>\[\033[0;37m\] "'
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user