-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_profile
173 lines (136 loc) · 5.59 KB
/
.bash_profile
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# This file (.bash_profile) sources .bashrc
#
# According to the bash man page, .bash_profile is executed for login shells, while .bashrc is
# executed for interactive non-login shells. An exception to the terminal window guidelines is
# Mac OS Xâs Terminal.app, which runs a login shell by default for each new terminal window,
# calling .bash_profile instead of .bashrc.
#
# Therefore using .bashrc as main shell-config file but sourcing it from .bash_profile allows for
# greatest flexibility in using one .bashrc for Mac & Linux environments
#
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
export PATH="$PATH:/Applications/DevDesktop/drush"
########################################################
# Display message when debugging startup scripts
########################################################
# set this variable to enable scripts to announce
# themselves at startup
STARTUP_DEBUG=
if [[ ! -z "${STARTUP_DEBUG}" ]]; then
echo "I am dot-bash_profile"
fi
########################################################
# BASH STARTUP SEQUENCE CONFIG
########################################################
source ~/.profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
########################################################
# RBENV
########################################################
# export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add
# the following to your ~/.bash_profile:
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])"
# Note: this ^^ may interfere with building old versions of
# Ruby (e.g <2.4) that use OpenSSL <1.1.
########################################################
# GIT - GITIGNORE
########################################################
function gi() { curl -L -s https://www.gitignore.io/api/$@ ;}
########################################################
# GIT-BRANCH COMMANDLINE-BLING
########################################################
parse_git_branch() { ### Adding git branch to prompt
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
########################################################
# FANCY COLORIZED BASH/CLI PROMPT
#
# see references for format, color-codes, etc
# * https://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
# * https://wiki.bash-hackers.org/scripting/terminalcodes
# * https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html
#
########################################################
fancy_prompt() {
cursor="$> "
# if 256 colors aren't available on the system, toggle the
# commented line for 8-bit colors instead
# PSUSER='\[\033[36m\][\u]\[\033[00m\] ' #8bit colors
PSUSER='\[\033[38;5;140m\][\u]\[\033[00m\]' #256-color version
# PSBRANCH="\[\033[33m\]\$(parse_git_branch)\[\033[00m\]\n "
PSBRANCH="\[\033[38;5;172m\]\$(parse_git_branch)\[\033[00m\]\n "
# PSPATH="\[\033[32m\]\w\[\033[00m\]\n"
PSPATH="\[\033[38;5;41m\]\w\[\033[00m\]\n"
# PSCURSOR=" \[\033[38;5;189m\]\$cursor\[\033[00m\]"
PSCURSOR=" \[\033[36;1m\]\$cursor\[\033[00m\]"
# add a blank line after the cli-cursor, but before any
# command output is shown
PS0="\n"
PS1="\
$PSUSER\
$PSBRANCH\
$PSPATH\
$PSCURSOR"
# PS2 does not work on mac osx for some reason
# PS2="$PSCURSOR"
}
fancy_prompt
########################################################
# HOMEBREW
########################################################
# 2019.0311: `brew doctor` output:
# Add Homebrew's sbin to the PATH as there are Homebrew formulae depending on it, due to adding executables there
export PATH="/usr/local/sbin:$PATH"
########################################################
# ANACONDA
########################################################
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/usr/local/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/usr/local/anaconda3/etc/profile.d/conda.sh" ]; then
. "/usr/local/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/usr/local/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
########################################################
# TMUXP path
########################################################
# 2020.0212: `pip install --user tmuxp` output:
# 'The script kaptan is installed in ~/.local/bin which is NOT on PATH'.
# \--> Consider adding it to PATH.
# 'The script tmuxp is installed in ~/.local/bin which is NOT on PATH'
# \--> Consider adding it to PATH.
export PATH="~/.local/bin:$PATH"
eval "$(_TMUXP_COMPLETE=source tmuxp)"
########################################################
# FNM - Fast Node Manager
########################################################
# fnm
eval "$(fnm env)"
########################################################
# GOOGLE CLOUD CONFIG
########################################################
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/jose8a/google-cloud-sdk/path.bash.inc' ]; then . '/Users/jose8a/google-cloud-sdk/path.bash.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/jose8a/google-cloud-sdk/completion.bash.inc' ]; then . '/Users/jose8a/google-cloud-sdk/completion.bash.inc'; fi
########################################################
#
# 2021.0726:
# To Suppress the following terminal warning now appearing
# at the creation of every new MacOS terminal shell:
#
# “The default interactive shell is now zsh”
#
########################################################
export BASH_SILENCE_DEPRECATION_WARNING=1