#autoload if [ $# != 1 ]; then echo "Usage: find_hooks " >&2 return 1 fi . $ZDOTDIR/.zsh/functions/run_hooks DEFUN # this will only load the functions we need iterate_hooks find "$@" . $ZDOTDIR/.zsh/functions/enable_wordsplit if [ -n "$hooks_found" ]; then if [ -n "$ZSH_VERSION" ]; then setopt local_options no_extended_glob fi for hook in $hooks_found; do echo "$hook" done fi restore_wordsplit