Last active
November 2, 2016 16:06
-
-
Save kanmeiban/39ae406888cd74d3114448f76d8211df to your computer and use it in GitHub Desktop.
macOS Sierra bash settings - git prompt abomination
This file contains hidden or 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
PATH=$PATH:~/bin | |
if [ -f /usr/local/share/chruby/chruby.sh ] && [ -f /usr/local/share/chruby/auto.sh ]; then | |
source /usr/local/share/chruby/chruby.sh | |
source /usr/local/share/chruby/auto.sh | |
chruby ruby-1.9.3-p392 | |
fi | |
if [ -f ~/.git-completion.bash ]; then | |
source ~/.git-completion.bash | |
fi | |
export LANG=bg_BG.UTF-8 | |
export LC_TIME=bg_BG.UTF-8 | |
export PS1="\u@\h:\w> " | |
export EDITOR='mate -w' | |
export PAGER=/usr/bin/less | |
shopt -s histappend | |
export HISTFILESIZE=100000000 | |
export HISTSIZE=1000000 | |
HISTTIMEFORMAT="+%Y-%m-%d %H:%M:%S" | |
# Aggressively save history after every command; reset terminal window title after closing SSH session | |
export PROMPT_COMMAND='history -a; echo -ne "\033]0;${ITERM_PROFILE}\007"' | |
export RSYNC_RSH=ssh | |
alias b=bundle | |
alias be='bundle exec' | |
alias gl='git log --oneline' | |
# Homebrew bash completion | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# git prompt | |
if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then | |
GIT_PROMPT_ONLY_IN_REPO=1 | |
# GIT_PROMPT_FETCH_REMOTE_STATUS=0 # uncomment to avoid fetching remote status | |
# GIT_PROMPT_SHOW_UPSTREAM=1 # uncomment to show upstream tracking branch | |
# GIT_PROMPT_SHOW_UNTRACKED_FILES=all # can be no, normal or all; determines counting of untracked files | |
# GIT_PROMPT_SHOW_CHANGED_FILES_COUNT=0 # uncomment to avoid printing the number of changed files | |
# GIT_PROMPT_STATUS_COMMAND=gitstatus_pre-1.7.10.sh # uncomment to support Git older than 1.7.10 | |
# GIT_PROMPT_START=... # uncomment for custom prompt start sequence | |
# GIT_PROMPT_END=... # uncomment for custom prompt end sequence | |
# as last entry source the gitprompt script | |
# GIT_PROMPT_THEME=Custom # use custom theme specified in file GIT_PROMPT_THEME_FILE (default ~/.git-prompt-colors.sh) | |
# GIT_PROMPT_THEME_FILE=~/.git-prompt-colors.sh | |
# GIT_PROMPT_THEME=Solarized # use theme optimized for solarized color scheme | |
source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" | |
fi | |
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment