summary refs log tree commit diff
path: root/Completion/User/_perldoc
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-05 22:04:03 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-05 22:04:03 +0000
commit4a34edc4855ef9d6a74c4658a2ed4f0f8bc1f130 (patch)
tree7fc49640b47e2caecb10c4a8d3867d5df51362be /Completion/User/_perldoc
parent63680c108bd05f3cb9401a7fcf547b53381d2c17 (diff)
downloadzsh-4a34edc4855ef9d6a74c4658a2ed4f0f8bc1f130.tar.gz
zsh-4a34edc4855ef9d6a74c4658a2ed4f0f8bc1f130.tar.xz
zsh-4a34edc4855ef9d6a74c4658a2ed4f0f8bc1f130.zip
Initial revision
Diffstat (limited to 'Completion/User/_perldoc')
-rw-r--r--Completion/User/_perldoc23
1 files changed, 23 insertions, 0 deletions
diff --git a/Completion/User/_perldoc b/Completion/User/_perldoc
new file mode 100644
index 000000000..cd5383a45
--- /dev/null
+++ b/Completion/User/_perldoc
@@ -0,0 +1,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!"
+else
+  _perl_modules
+  _perl_basepods
+  _path_files -/ -g '*.(pod|pm)'
+fi
+