Naposledy aktivní 6 months ago

Revize f034b2d50ec7a40469d86a07f1f8f478bbb9cc67

.bashrc Raw
1if [ "$TERM" != "dumb" ]; then
2 eval "`dircolors -b`"
3 alias ls='ls --color=auto'
4 function _git_prompt() {
5 local git_status="`git status -unormal 2>&1`"
6 if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then
7 if [[ "$git_status" =~ nothing\ to\ commit ]]; then
8 local ansi=32
9 elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then
10 local ansi=34
11 else
12 local ansi=33
13 fi
14 echo -n '\[\e[0;33;'"$ansi"'m\]'"$(__git_ps1)"'\[\e[0m\]'
15 fi
16 }
17 function _prompt_command() {
18 PS1="${debian_chroot:+($debian_chroot)}\[\033[01;38m\]\u@\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[00m\]`_git_prompt`\$ "
19 }
20 PROMPT_COMMAND=_prompt_command
21fi
22