My personal dotfiles
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.

.zshrc 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # load custom executable functions
  2. for function in ~/.zsh/functions/*; do
  3. source $function
  4. done
  5. # extra files in ~/.zsh/configs/pre , ~/.zsh/configs , and ~/.zsh/configs/post
  6. # these are loaded first, second, and third, respectively.
  7. _load_settings() {
  8. _dir="$1"
  9. if [ -d "$_dir" ]; then
  10. if [ -d "$_dir/pre" ]; then
  11. for config in "$_dir"/pre/**/*(N-.); do
  12. . $config
  13. done
  14. fi
  15. for config in "$_dir"/**/*(N-.); do
  16. case "$config" in
  17. "$_dir"/pre/*)
  18. :
  19. ;;
  20. "$_dir"/post/*)
  21. :
  22. ;;
  23. *)
  24. if [ -f $config ]; then
  25. . $config
  26. fi
  27. ;;
  28. esac
  29. done
  30. if [ -d "$_dir/post" ]; then
  31. for config in "$_dir"/post/**/*(N-.); do
  32. . $config
  33. done
  34. fi
  35. fi
  36. }
  37. _load_settings "$HOME/.zsh/configs"
  38. # aliases
  39. # [[ -f ~/.aliases ]] && source ~/.aliases
  40. #alias vim='nvim'
  41. alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
  42. alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES;killall Finder /System/Library/CoreServices/Finder.app'
  43. alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app=https://www.google.com&;disown'
  44. alias py3='python3'
  45. # List directory contents
  46. alias lsa='ls -lah --color'
  47. alias l='ls --color'
  48. alias ll='ls -lh --color'
  49. alias la='ls -A --color'
  50. alias ls='ls --color'
  51. # Push and pop directories on directory stack
  52. alias pu='pushd'
  53. alias po='popd'
  54. alias md='mkdir -p'
  55. alias rd=rmdir
  56. alias d='dirs -v | head -10'
  57. alias -g ...='../..'
  58. alias -g ....='../../..'
  59. alias -g .....='../../../..'
  60. alias -g ......='../../../../..'
  61. # Local config
  62. [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local