mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-11-04 10:58:43 +00:00
Install bash-git-prompt with brew
This commit is contained in:
@@ -32,25 +32,16 @@ HISTFILESIZE=2000
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
if [ -f ~/.bash-git-prompt/share/gitprompt.sh ]; then
|
||||
source ~/.bash-git-prompt/share/gitprompt.sh
|
||||
fi
|
||||
|
||||
GIT_PROMPT_ONLY_IN_REPO=1
|
||||
GIT_PROMPT_START="\[\e[1;32m\]\w\[\e[m\]"
|
||||
GIT_PROMPT_END="\[\e[1;m\] \[\e[1;m\]"
|
||||
GIT_PROMPT_THEME=Georgi
|
||||
|
||||
######################
|
||||
# Aliases #
|
||||
######################
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
@@ -59,33 +50,48 @@ alias ll='ls -alFG'
|
||||
alias la='ls -AG'
|
||||
alias l='ls -CFG'
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
# Editor
|
||||
export EDITOR='code -w'
|
||||
|
||||
# bash-git-prompt
|
||||
GIT_PROMPT_ONLY_IN_REPO=1
|
||||
GIT_PROMPT_START="\[\e[1;32m\]\w\[\e[m\]"
|
||||
GIT_PROMPT_END="\[\e[1;m\] \[\e[1;m\]"
|
||||
|
||||
# Old setup
|
||||
if [ -f ~/.bash-git-prompt/share/gitprompt.sh ]; then
|
||||
GIT_PROMPT_THEME=Georgi
|
||||
source ~/.bash-git-prompt/share/gitprompt.sh
|
||||
fi
|
||||
|
||||
######################
|
||||
# Completion #
|
||||
######################
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
|
||||
# Git completion
|
||||
if [ -f ~/.git-completion.bash ]; then
|
||||
. ~/.git-completion.bash
|
||||
# Setup via brew
|
||||
if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then
|
||||
GIT_PROMPT_THEME=Custom
|
||||
GIT_PROMPT_THEME_FILE=~/.git-prompt-colors.sh
|
||||
__GIT_PROMPT_DIR=$(brew --prefix)/opt/bash-git-prompt/share
|
||||
source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh"
|
||||
fi
|
||||
|
||||
######################
|
||||
# Sources & exports #
|
||||
######################
|
||||
|
||||
if [ -f ~/.bashrc_local ]; then
|
||||
. ~/.bashrc_local
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# Editor
|
||||
export EDITOR='subl -w'
|
||||
if [ -f ~/.bashrc_local ]; then
|
||||
. ~/.bashrc_local
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
|
||||
# Git completion
|
||||
if [ -f ~/.git-completion.bash ]; then
|
||||
. ~/.git-completion.bash
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user