Last active
June 20, 2020 23:01
-
-
Save samuraijane/26dbc299147fdc1d54c7b5f05b0e6579 to your computer and use it in GitHub Desktop.
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
# -------------------------------------------------------------- | |
# IMPORT ALIAS COMMANDS | |
# -------------------------------------------------------------- | |
. ~/.alias | |
# -------------------------------------------------------------- | |
# NODE VERSION MANAGER | |
# -------------------------------------------------------------- | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm | |
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" | |
# -------------------------------------------------------------- | |
# LOAD RBENV AUTOMATICALLY | |
# Be sure to fire `rbenv hash` after installing new gems in order to generate new shims | |
# -------------------------------------------------------------- | |
eval "$(rbenv init -)" | |
# -------------------------------------------------------------- | |
# DEFINE A FUNCTION THAT SHOWS THE CURRENT GIT BRANCH | |
# -------------------------------------------------------------- | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# -------------------------------------------------------------- | |
# CUSTOMIZE THE COMMAND PROMPT AND SHOW ONLY THE CURRENT DIRECTORY | |
# t is current time | |
# u is username | |
# w is current working directory with the full path | |
# [\033[37m\] is light gray | |
# [\033[32m\] is green | |
# [\033[33m\] is yellow | |
# [\033[00m\] is Terminal's default color, black in this case | |
# -------------------------------------------------------------- | |
export PS1="\[\033[37m\][\t] \[\033[32m\]\W\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " | |
# -------------------------------------------------------------- | |
# ADD MONGO TO YOUR PATH | |
# -------------------------------------------------------------- | |
export PATH=$PATH:~/bin:/usr/local/opt/[email protected]/bin:~/.composer/vendor/bin | |
# -------------------------------------------------------------- | |
# ADD POSTGRESQL TO YOUR PATH | |
# -------------------------------------------------------------- | |
export PGDATA=/usr/local/var/postgresexport PATH="/usr/local/opt/[email protected]/bin:$PATH" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment