about summary refs log tree commit diff
path: root/Completion/User/_perldoc
blob: d1565044895235fc9a617cab919944b78b592324 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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!"
  return 1
else
  _perl_modules
  _perl_basepods
  _path_files -/ -g '*.(pod|pm)'
fi