test -e "$HOME/.functions" && source "$HOME/.functions"

unsetopt autocd
bindkey -v
zstyle :compinstall filename "$HOME/.zshrc"
autoload -Uz compinit
compinit -u -d "$XDG_CACHE_HOME/zsh/zcompdump"
setopt rmstarsilent

plugindir="/usr/share/zsh/plugins"
for plugin in \
	"$plugindir/zsh-autosuggestions/zsh-autosuggestions.zsh" \
	"$plugindir/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh" \
	"$plugindir/zsh-history-substring-search/zsh-history-substring-search.zsh"
do
	source "$plugin"
done

bindkey -a 'k' history-substring-search-up
bindkey -a 'j' history-substring-search-down

# aliases
alias weather="curl 'wttr.in/?0'"
alias vi="busybox vi"
alias tar="bsdtar"
alias which="$HOME/.local/bin/which"
