about summary refs log tree commit diff
path: root/Functions/Completion/_man
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Completion/_man')
-rw-r--r--Functions/Completion/_man11
1 files changed, 11 insertions, 0 deletions
diff --git a/Functions/Completion/_man b/Functions/Completion/_man
new file mode 100644
index 000000000..8204fba0b
--- /dev/null
+++ b/Functions/Completion/_man
@@ -0,0 +1,11 @@
+#defcomp man
+setopt localoptions rcexpandparam
+
+local rep
+if [[ $2 = (<->*|ln) ]]; then
+  rep=( $manpath/(man|cat)$2/$PREFIX*$SUFFIX.<->*(N:t:r) )
+else
+  rep=( $manpath/(man|cat)*/$PREFIX*$SUFFIX.<->*(N:t:r) )
+fi
+
+(( $#rep )) && compadd -m $rep