#compdef look local curcontext="$curcontext" state line typeset -A opt_args _arguments -C -s \ '-t+[termination character]:termination character:' \ '-f[case insensitive]' \ '-d[dictionary order]' \ ':string:->string' \ ':dictionary file:_files -f' && return 0 case "$state" in string) [[ -n "$PREFIX" ]] && _wanted values expl 'word prefix' compadd - $(_call values $words[1] $PREFIX) ;; esac