2022-02-23 00:23:40 +01:00
|
|
|
# Load zsh-snap (znap) plugin manager
|
|
|
|
zstyle ':znap:*' repos-dir ~/.znap
|
|
|
|
source ~/.znap/znap.zsh
|
2018-08-18 13:15:18 +02:00
|
|
|
|
2019-01-19 14:47:24 +01:00
|
|
|
# Helper Functions
|
|
|
|
# Returns whether the given command is executable or aliased.
|
|
|
|
_has() {
|
|
|
|
return $( whence $1 >/dev/null )
|
|
|
|
}
|
2018-08-18 13:15:18 +02:00
|
|
|
|
2022-02-23 00:23:40 +01:00
|
|
|
# Plugins
|
|
|
|
znap source ohmyzsh/ohmyzsh lib/{git,theme-and-appearance}
|
|
|
|
znap source ohmyzsh/ohmyzsh plugins/{per-directory-history,git}
|
|
|
|
# ZSH Theme
|
|
|
|
znap prompt ohmyzsh/ohmyzsh robbyrussell
|
2018-12-07 12:15:50 +01:00
|
|
|
|
2019-01-19 14:47:24 +01:00
|
|
|
# aliases
|
2018-08-18 13:15:18 +02:00
|
|
|
alias ll='ls -l'
|
|
|
|
alias la='ls -la'
|
2019-01-19 16:34:16 +01:00
|
|
|
alias :q='exit'
|
2019-12-11 22:38:05 +01:00
|
|
|
alias fresh="source ~/.zshrc"
|
2019-01-19 14:47:24 +01:00
|
|
|
|
|
|
|
# localcommands
|
2019-12-11 22:38:05 +01:00
|
|
|
if [ -f ~/.dotfiles/shell/localcommands ]
|
2018-08-18 13:15:18 +02:00
|
|
|
then
|
2019-12-11 22:38:05 +01:00
|
|
|
source ~/.dotfiles/shell/localcommands
|
2018-08-18 13:15:18 +02:00
|
|
|
fi
|
2019-01-19 14:47:24 +01:00
|
|
|
|
2018-12-07 12:32:38 +01:00
|
|
|
# Tmuxinator autocomplete
|
|
|
|
if [ -f ~/.bin/tmuxinator.zsh ]; then
|
2019-01-19 14:47:24 +01:00
|
|
|
source ~/.bin/tmuxinator.zsh
|
|
|
|
fi
|
|
|
|
|
2022-02-23 00:21:58 +01:00
|
|
|
# Set vim as default editor
|
|
|
|
export EDITOR='nvim'
|
2019-01-19 16:34:16 +01:00
|
|
|
|
2019-12-11 23:23:02 +01:00
|
|
|
if _has ruby;
|
|
|
|
then
|
|
|
|
export PATH="$PATH:$(ruby -e 'print Gem.user_dir')/bin"
|
|
|
|
fi
|
2021-09-05 21:46:13 +02:00
|
|
|
|
|
|
|
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
|
|
|
[[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh"
|
|
|
|
|
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|