Naposledy aktivní 6 months ago

Revize 750a5e7f4fb4576d159af4604ec65ed918f187d1

.bashrc Raw
1if [ "$TERM" != "dumb" ]; then
2 if [[ "$OSTYPE" == "darwin"* ]]; then
3 # For ls colors in Solarized theme
4 # https://github.com/seebi/dircolors-solarized/issues/10
5 export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD
6 # source git completion
7 if [ -f /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash ]; then
8 . /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
9 fi
10 source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
11 else
12 eval "`dircolors -b`"
13 fi
14 alias ls='ls --color=auto'
15 function _git_prompt() {
16 local git_status="`git status -unormal 2>&1`"
17 if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then
18 if [[ "$git_status" =~ nothing\ to\ commit ]]; then
19 local ansi=32
20 elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then
21 local ansi=34
22 else
23 local ansi=33
24 fi
25 echo -n '\[\e[0;33;'"$ansi"'m\]'"$(__git_ps1)"'\[\e[0m\]'
26 fi
27 }
28 function _prompt_command() {
29 PS1="${debian_chroot:+($debian_chroot)}\[\033[01;38m\]\u@\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[00m\]`_git_prompt`\$ "
30 }
31 PROMPT_COMMAND=_prompt_command
32fi
33