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.
 
 
 
 
 
 

125 lines
4.1 KiB

  1. # If you come from bash you might have to change your $PATH.
  2. # export PATH=$HOME/bin:/usr/local/bin:$PATH
  3. # Path to your oh-my-zsh installation.
  4. [ -z "${ZSH}" ] && export ZSH="$HOME/.oh-my-zsh"
  5. # Set name of the theme to load. Optionally, if you set this to "random"
  6. # it'll load a random theme each time that oh-my-zsh is loaded.
  7. # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
  8. ZSH_THEME="robbyrussell"
  9. # Set list of themes to load
  10. # Setting this variable when ZSH_THEME=random
  11. # cause zsh load theme from this variable instead of
  12. # looking in ~/.oh-my-zsh/themes/
  13. # An empty array have no effect
  14. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
  15. # Uncomment the following line to use case-sensitive completion.
  16. # CASE_SENSITIVE="true"
  17. # Uncomment the following line to use hyphen-insensitive completion. Case
  18. # sensitive completion must be off. _ and - will be interchangeable.
  19. # HYPHEN_INSENSITIVE="true"
  20. # Uncomment the following line to disable bi-weekly auto-update checks.
  21. # DISABLE_AUTO_UPDATE="true"
  22. # Uncomment the following line to change how often to auto-update (in days).
  23. # export UPDATE_ZSH_DAYS=13
  24. # Uncomment the following line to disable colors in ls.
  25. # DISABLE_LS_COLORS="true"
  26. # Uncomment the following line to disable auto-setting terminal title.
  27. # DISABLE_AUTO_TITLE="true"
  28. # Uncomment the following line to enable command auto-correction.
  29. # ENABLE_CORRECTION="true"
  30. # Uncomment the following line to display red dots whilst waiting for completion.
  31. # COMPLETION_WAITING_DOTS="true"
  32. # Uncomment the following line if you want to disable marking untracked files
  33. # under VCS as dirty. This makes repository status check for large repositories
  34. # much, much faster.
  35. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  36. # Uncomment the following line if you want to change the command execution time
  37. # stamp shown in the history command output.
  38. # You can set one of the optional three formats:
  39. # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  40. # or set a custom format using the strftime function format specifications,
  41. # see 'man strftime' for details.
  42. # HIST_STAMPS="mm/dd/yyyy"
  43. # Would you like to use another custom folder than $ZSH/custom?
  44. # ZSH_CUSTOM=/path/to/new-custom-folder
  45. # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
  46. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  47. # Example format: plugins=(rails git textmate ruby lighthouse)
  48. # Add wisely, as too many plugins slow down shell startup.
  49. plugins=()
  50. source $ZSH/oh-my-zsh.sh
  51. # User configuration
  52. # export MANPATH="/usr/local/man:$MANPATH"
  53. # You may need to manually set your language environment
  54. # export LANG=en_US.UTF-8
  55. # preferred editor for local and remote sessions
  56. export EDITOR='zsh $HOME/scripts/neovim-remote.sh'
  57. # Compilation flags
  58. # export ARCHFLAGS="-arch x86_64"
  59. # ssh
  60. # export SSH_KEY_PATH="~/.ssh/rsa_id"
  61. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  62. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  63. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  64. # For a full list of active aliases, run `alias`.
  65. #
  66. # Example aliases
  67. # alias zshconfig="mate ~/.zshrc"
  68. # alias ohmyzsh="mate ~/.oh-my-zsh"
  69. NVM_HOME="${HOME}/.config/nvm"
  70. source ~/scripts/paths.sh
  71. source ~/scripts/aliases.sh
  72. # automatically switch node version if .nvmrc file is present
  73. if [ -d "$NVM_HOME" ]; then
  74. autoload -U add-zsh-hook
  75. load-nvmrc() {
  76. local node_version="$(nvm version)"
  77. local nvmrc_path="$(nvm_find_nvmrc)"
  78. if [ -n "$nvmrc_path" ]; then
  79. local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
  80. if [ "$nvmrc_node_version" = "N/A" ]; then
  81. nvm install
  82. elif [ "$nvmrc_node_version" != "$node_version" ]; then
  83. nvm use
  84. fi
  85. elif [ "$node_version" != "$(nvm version default)" ]; then
  86. echo "Reverting to nvm default version"
  87. nvm use default
  88. fi
  89. }
  90. add-zsh-hook chpwd load-nvmrc
  91. load-nvmrc
  92. fi
  93. #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
  94. export SDKMAN_DIR="$HOME/.sdkman"
  95. [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"