SHARE
TWEET

Untitled

a guest Aug 12th, 2017 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #  ---------------------------------------------------------------------------
  2. #
  3. #  Description:  This file holds all my BASH configurations and aliases
  4. #
  5. #  Sections:
  6. #  1.  Environment Configuration
  7. #  2.  Make Terminal Better (remapping defaults and adding functionality)
  8. #
  9. #  ---------------------------------------------------------------------------
  10.  
  11. #   -------------------------------
  12. #   1. ENVIRONMENT CONFIGURATION
  13. #   -------------------------------
  14.  
  15. #   Change Prompt
  16. #   ------------------------------------------------------------
  17.     export PS1="\u@\h \W \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
  18.  
  19. #   Set Default Editor (change 'Nano' to the editor of your choice)
  20. #   ------------------------------------------------------------
  21.     export EDITOR=/usr/bin/nano
  22.  
  23. #   Set Paths
  24. #   ------------------------------------------------------------
  25.     export PATH="$PATH:/usr/local/bin/"
  26.  
  27. #   Node config
  28. #   ------------------------------------------------------------
  29.     export NVM_DIR=~/.nvm
  30.     # source $(brew --prefix nvm)/nvm.sh
  31.  
  32. #   Brew config
  33. #   ------------------------------------------------------------
  34.     if [ -f $(brew --prefix)/etc/bash_completion ]; then
  35.         . $(brew --prefix)/etc/bash_completion
  36.     fi
  37.  
  38. #   -----------------------------
  39. #   2. MAKE TERMINAL BETTER
  40. #   -----------------------------
  41.  
  42. #   Helper functions
  43. #   ------------------------------------------------------------
  44.     gitConfig() { git config user.name "$1"; git config user.email "$2"; }
  45.  
  46. #   GIT aliases
  47. #   ------------------------------------------------------------
  48.     alias gs='git status'
  49.     alias gca='git commit --amend'
  50.  
  51.     alias git_huyb='gitConfig "Huy Nguyen" huyb.1991@gmail.com'
  52.  
  53. #   Git config
  54. #   ------------------------------------------------------------
  55.     export GITAWAREPROMPT=~/.bash/git-aware-prompt
  56.     alias gitawareprompt='source "${GITAWAREPROMPT}/main.sh"'
RAW Paste Data
Top