The very personal dotfiles of Levi Olson.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

6 years ago
6 years ago
  1. #!/bin/bash
  2. ############################################
  3. # .bash_profile
  4. # ---------------
  5. # Based on the amazing work of Jess Frazelle
  6. ############################################
  7. # Load the shell dotfiles, and then some:
  8. # * ~/.path can be used to extend `$PATH`.
  9. # * ~/.extra can be used for other settings you don’t want to commit.
  10. for file in ~/.{bash_prompt,aliases,functions,path,dockerfunc,extra,exports}; do
  11. if [[ -r "$file" ]] && [[ -f "$file" ]]; then
  12. # shellcheck source=/dev/null
  13. source "$file"
  14. fi
  15. done
  16. unset file
  17. # Save multi-line commands as single line in history
  18. shopt -s cmdhist
  19. # Case-insensitive globbing (used in pathname expansion)
  20. shopt -s nocaseglob
  21. # Append to the Bash history file, rather than overwriting it
  22. shopt -s histappend
  23. # Autocorrect typos in path names when using `cd`
  24. shopt -s cdspell
  25. # Enable some Bash 4 features when possible:
  26. # * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
  27. # * Recursive globbing, e.g. `echo **/*.txt`
  28. for option in autocd globstar; do
  29. shopt -s "$option" 2> /dev/null
  30. done
  31. # Add tab completion for SSH hostnames based on ~/.ssh/config
  32. # ignoring wildcards
  33. [[ -e "$HOME/.ssh/config" ]] && complete -o "default" \
  34. -o "nospace" \
  35. -W "$(grep "^Host" ~/.ssh/config | \
  36. grep -v "[?*]" | cut -d " " -f2 | \
  37. tr ' ' '\n')" scp sftp ssh
  38. export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig