Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ---------------------------------------------------------------------------
- #
- # Description: This file holds all my BASH configurations and aliases
- #
- # Sections:
- # 1. Environment Configuration
- # 2. Make Terminal Better (remapping defaults and adding functionality)
- #
- # ---------------------------------------------------------------------------
- # -------------------------------
- # 1. ENVIRONMENT CONFIGURATION
- # -------------------------------
- # Change Prompt
- # ------------------------------------------------------------
- export PS1="\u@\h \W \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
- # Set Default Editor (change 'Nano' to the editor of your choice)
- # ------------------------------------------------------------
- export EDITOR=/usr/bin/nano
- # Set Paths
- # ------------------------------------------------------------
- export PATH="$PATH:/usr/local/bin/"
- # Node config
- # ------------------------------------------------------------
- export NVM_DIR=~/.nvm
- # source $(brew --prefix nvm)/nvm.sh
- # Brew config
- # ------------------------------------------------------------
- if [ -f $(brew --prefix)/etc/bash_completion ]; then
- . $(brew --prefix)/etc/bash_completion
- fi
- # -----------------------------
- # 2. MAKE TERMINAL BETTER
- # -----------------------------
- # Helper functions
- # ------------------------------------------------------------
- gitConfig() { git config user.name "$1"; git config user.email "$2"; }
- # GIT aliases
- # ------------------------------------------------------------
- alias gs='git status'
- alias gca='git commit --amend'
- alias git_huyb='gitConfig "Huy Nguyen" huyb.1991@gmail.com'
- # Git config
- # ------------------------------------------------------------
- export GITAWAREPROMPT=~/.bash/git-aware-prompt
- alias gitawareprompt='source "${GITAWAREPROMPT}/main.sh"'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement