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 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Initial Oh My Zsh setup
  2. #
  3. export ZSH="/Users/oji/.oh-my-zsh"
  4. export ZSH_THEME="avit"
  5. export DISABLE_UPDATE_PROMPT="true"
  6. export UPDATE_ZSH_DAYS=13
  7. export COMPLETION_WAITING_DOTS="true"
  8. export ENABLE_CORRECTION="false"
  9. plugins=(git z)
  10. source "${ZSH}/oh-my-zsh.sh"
  11. # Define custom environment variables
  12. #
  13. export ZSH_PROFILE="${HOME}/.zshrc"
  14. export DOTNET_CLI_TELEMETRY_OPTOUT=1
  15. # Tool related environment variables
  16. #
  17. export AWS_PAGER='less -RFX'
  18. # Toolings
  19. #
  20. eval "$(nodenv init -)"
  21. eval "$(goenv init -)"
  22. eval "$(rbenv init -)"
  23. eval "$(thefuck --alias)"
  24. source "$(dirname $(readlink "${ZSH_PROFILE}"))/.docker_shims.zsh"
  25. export PHPENV_ROOT="/Users/oji/.phpenv"
  26. if [ -d "${PHPENV_ROOT}" ]; then
  27. export PATH="${PHPENV_ROOT}/bin:${PATH}"
  28. eval "$(phpenv init -)"
  29. fi
  30. # Aliases and functions
  31. #
  32. alias f='\fuck'
  33. alias k='\kubectl'
  34. if type gls > /dev/null; then
  35. alias l='\gls -lhA --color=auto --group-directories-first'
  36. alias ls='\gls -lhA --color=auto --group-directories-first'
  37. else
  38. alias l='\ls -lhA'
  39. alias ls='\ls -lhA'
  40. fi
  41. alias d='\dirs -v'
  42. alias p='\pushd'
  43. alias pp='\popd'
  44. alias tf='\terraform'
  45. alias mkdir='\mkdir -vp'
  46. alias ipglobal='\dig +short myip.opendns.com @resolver1.opendns.com'
  47. alias sudo='sudo ' # This allows for using aliases under sudo
  48. alias nsenter='\docker run -it --rm --privileged --pid=host justincormack/nsenter1'
  49. alias dockerdive='\docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive'
  50. alias dockerclean='\docker rmi --force $(docker images -q)'
  51. function git {
  52. if [[ $# -gt 0 ]]; then
  53. /usr/bin/env git $@
  54. else
  55. /usr/bin/env git status --short --branch
  56. fi
  57. }
  58. alias g='git'
  59. function hub {
  60. if [[ $# -gt 0 ]]; then
  61. /usr/bin/env hub $@
  62. else
  63. /usr/bin/env hub status --short --branch
  64. fi
  65. }
  66. alias gh='hub'
  67. alias github='hub'
  68. function npm {
  69. if [[ $# -gt 0 ]]; then
  70. /usr/bin/env npm $@
  71. else
  72. /usr/bin/env npm install
  73. fi
  74. }
  75. alias n='npm'
  76. function vagrant {
  77. if [[ $# -gt 0 ]]; then
  78. /usr/bin/env vagrant $@
  79. else
  80. /usr/bin/env vagrant up
  81. fi
  82. }
  83. alias v='vagrant'
  84. # Options
  85. #
  86. # More sane `pushd` settings
  87. unsetopt auto_pushd
  88. setopt pushd_ignore_dups