Jan Wagner ревизий этого фрагмента 11 years ago. К ревизии
1 file changed, 2 insertions, 1 deletion
.bashrc
| @@ -8,10 +8,11 @@ if [ "$TERM" != "dumb" ]; then | |||
| 8 | 8 | . /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash | |
| 9 | 9 | fi | |
| 10 | 10 | source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh | |
| 11 | + | alias ls='ls -G' | |
| 11 | 12 | else | |
| 12 | 13 | eval "`dircolors -b`" | |
| 14 | + | alias ls='ls --color=auto' | |
| 13 | 15 | fi | |
| 14 | - | alias ls='ls --color=auto' | |
| 15 | 16 | function _git_prompt() { | |
| 16 | 17 | local git_status="`git status -unormal 2>&1`" | |
| 17 | 18 | if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then | |
Jan Wagner ревизий этого фрагмента 11 years ago. К ревизии
1 file changed, 5 insertions
.bashrc
| @@ -3,6 +3,11 @@ if [ "$TERM" != "dumb" ]; then | |||
| 3 | 3 | # For ls colors in Solarized theme | |
| 4 | 4 | # https://github.com/seebi/dircolors-solarized/issues/10 | |
| 5 | 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 | |
| 6 | 11 | else | |
| 7 | 12 | eval "`dircolors -b`" | |
| 8 | 13 | fi | |
Jan Wagner ревизий этого фрагмента 11 years ago. К ревизии
1 file changed, 7 insertions, 1 deletion
.bashrc
| @@ -1,5 +1,11 @@ | |||
| 1 | 1 | if [ "$TERM" != "dumb" ]; then | |
| 2 | - | eval "`dircolors -b`" | |
| 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 | + | else | |
| 7 | + | eval "`dircolors -b`" | |
| 8 | + | fi | |
| 3 | 9 | alias ls='ls --color=auto' | |
| 4 | 10 | function _git_prompt() { | |
| 5 | 11 | local git_status="`git status -unormal 2>&1`" | |
waja ревизий этого фрагмента 12 years ago. К ревизии
1 file changed, 21 insertions
.bashrc(файл создан)
| @@ -0,0 +1,21 @@ | |||
| 1 | + | if [ "$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 | |
| 21 | + | fi | |