Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 17th, 2013  |  syntax: Bash  |  size: 1.48 KB  |  views: 32  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Load ~/.extra, ~/.bash_prompt, ~/.exports, ~/.aliases, and ~/.functions
  2. # ~/.extra can be used for settings you don’t want to commit
  3. for file in ~/.{extra,bash_prompt,exports,aliases,functions}; do
  4.         [ -r "$file" ] && source "$file"
  5. done
  6. unset file
  7.  
  8. # Case-insensitive globbing (used in pathname expansion)
  9. shopt -s nocaseglob
  10.  
  11. # Append to the Bash history file, rather than overwriting it
  12. shopt -s histappend
  13.  
  14. # Autocorrect typos in path names when using `cd`
  15. shopt -s cdspell
  16.  
  17. # Enable some Bash 4 features when possible:
  18. # * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
  19. # * Recursive globbing, e.g. `echo **/*.txt`
  20. for option in autocd globstar; do
  21.     shopt -s "$option" 2> /dev/null
  22. done
  23.  
  24. # Prefer US English and use UTF-8
  25. export LC_ALL="en_US.UTF-8"
  26. export LANG="en_US"
  27.  
  28. # Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
  29. [ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh
  30.  
  31. # Add tab completion for `defaults read|write NSGlobalDomain`
  32. # You could just use `-g` instead, but I like being explicit
  33. complete -W "NSGlobalDomain" defaults
  34.  
  35. # Add `killall` tab completion for common apps
  36. complete -o "nospace" -W "Finder Dock Mail Safari iTunes iCal Address\ Book SystemUIServer" killall
  37.  
  38. if [ -f /usr/local/etc/bash_completion ]; then
  39.   . /usr/local/etc/bash_completion
  40. fi
  41.  
  42. if [ -f ~/.ssh/id_rsa ]; then
  43.     ssh-add ~/.ssh/id_rsa
  44. fi
clone this paste RAW Paste Data