-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bashrc
61 lines (47 loc) · 1.95 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# .bashrc
#aliases
[ -r ~/.bash_aliases ] && source ~/.bash_aliases
#git prompt
[ -r ~/git-prompt.sh ] && source ~/git-prompt.sh
#git completion
[ -r ~/git-completion.bash ] && source ~/git-completion.bash
# Source global definitions
[ -r /etc/bashrc ] && source /etc/bashrc
# Terminal fuzzy file search
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export FZF_DEFAULT_COMMAND='ag -l --hidden'
export FZF_DEFAULT_OPTS='--height 75% --layout=reverse --border'
#terminal colors
black=$(tput -Txterm setaf 0)
red=$(tput -Txterm setaf 1)
green=$(tput -Txterm setaf 2)
yellow=$(tput -Txterm setaf 3)
dk_blue=$(tput -Txterm setaf 4)
pink=$(tput -Txterm setaf 5)
lt_blue=$(tput -Txterm setaf 6)
bold=$(tput -Txterm bold)
reset=$(tput -Txterm sgr0)
GIT_PS1_SHOWDIRTYSTATE='y'
GIT_PS1_SHOWCOLORHINTS='y'
GIT_PS1_SHOWSTASHSTATE='y'
PROMPT_COMMAND='__git_ps1' # git info
PROMPT_COMMAND+=' "\[$pink\]\u' #username
PROMPT_COMMAND+='\[$yellow\]@' #at-sign
PROMPT_COMMAND+='\[$green\]\h' #hostname
PROMPT_COMMAND+=' \[$lt_blue\]\w\[$reset\]"' #working directory
PROMPT_COMMAND+=' "\[$lt_blue\]\n>\[$reset\] "' #cursor line
export PROMPT_COMMAND
# https://github.com/wting/autojump
# NOTE: This has to come AFTER exporting PROMPT_COMMAND
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
#export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ;} history -a"
export EDITOR=nvim
export BASH_SILENCE_DEPRECATION_WARNING=1 # silence zsh deprecaton warning for mac
complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null || complete -o default -o nospace -F _git g
# use vim navigation in the terminal
set -o vi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"