mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
24 lines
511 B
Plaintext
24 lines
511 B
Plaintext
#compdef perldoc
|
|
#
|
|
#
|
|
# _perldoc - zsh completion function for perldoc
|
|
#
|
|
# Adam Spiers <adam@spiers.net>
|
|
#
|
|
# Behaviour should be roughly equivalent to:
|
|
# compctl -k perl_modules -k perl_basepods -f
|
|
# -x 'c[-1,-f]' -k perl_funcs --
|
|
# + -k man_pages
|
|
# perldoc
|
|
|
|
if [[ $CURRENT -eq 3 && $words[2] == '-f' ]]; then
|
|
_perl_builtin_funcs
|
|
elif [[ $CURRENT -eq 3 && $words[2] == '-q' ]]; then
|
|
zle -R "I can't read your mind!"
|
|
else
|
|
_perl_modules
|
|
_perl_basepods
|
|
_path_files -/ -g '*.(pod|pm)'
|
|
fi
|
|
|