HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/zsh/functions/Completion/Zsh/_add-zsh-hook
#compdef add-zsh-hook

_add-zsh-hook_hooks() {
  local expl
  if (( $+opt_args[-d] )); then
    _wanted functions expl "installed hooks" compadd -a - "$line[1]_functions" && return 0
  else
    _functions && return 0
  fi
  return 1
}

_add-zsh-hook() {
  local context state state_descr line
  typeset -A opt_args
  _arguments -s -w -S : \
    '(-D)-d[remove HOOK from the array]' \
    '(-d)-D[interpret HOOK as pattern to remove from the array]' \
    {-U,-z,-k}"[passed to 'autoload']" \
    ':hook class:(chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name)' \
    ':hook function:_add-zsh-hook_hooks'
}

_add-zsh-hook "$@"