Sha256: c65677a33b97b613d051cbf5d601ed3ccd3b4981ce58ec8dec1120fef0b42bae
Contents?: true
Size: 663 Bytes
Versions: 14
Compression:
Stored size: 663 Bytes
Contents
# Source this script from ~/.zshrc _hook_targets() { local cmds cur ff if (($COMP_CWORD == 1)) then cur="${COMP_WORDS[1]}" cmds="$(hook help -c)" COMPREPLY=($(compgen -W "$cmds" -- "$cur")) COMPREPLY=( "${COMPREPLY[@]/%/ }" ) else # get all matching files and directories COMPREPLY=($(compgen -f -- "${COMP_WORDS[$COMP_CWORD]}")) for ((ff=0; ff<${#COMPREPLY[@]}; ff++)); do [[ -d ${COMPREPLY[$ff]} ]] && COMPREPLY[$ff]+='/' [[ -f ${COMPREPLY[$ff]} ]] && COMPREPLY[$ff]+=' ' done fi } complete -o bashdefault -o default -o nospace -F _hook_targets hook
Version data entries
14 entries across 14 versions & 1 rubygems