# Zsh options for all users

# enable extended globbing
setopt extended_glob

# Autoload dotfiles
for dotfile in "$ZDOTDIR"/*(D); do
    source $dotfile
done

misc_files=(
    /etc/zsh_command_not_found
)
for file in ${misc_files[@]}; do
    [[ -r "${file}" ]] && source "${file}"
done

# Check history file
if [[ ! -f "${HISTFILE}" ]]; then
    mkdir -p "${HISTFILE%/*}"
    touch "${HISTFILE}"
fi

# vim-like keybindings
bindkey -v