diff options
Diffstat (limited to 'Functions/Completion/__man')
-rw-r--r-- | Functions/Completion/__man | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Functions/Completion/__man b/Functions/Completion/__man new file mode 100644 index 000000000..a0f00f58b --- /dev/null +++ b/Functions/Completion/__man @@ -0,0 +1,11 @@ +#function 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 |