about summary refs log tree commit diff
path: root/Completion/User
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User')
-rw-r--r--Completion/User/_man10
1 files changed, 8 insertions, 2 deletions
diff --git a/Completion/User/_man b/Completion/User/_man
index 88d2118c0..ec2af00f0 100644
--- a/Completion/User/_man
+++ b/Completion/User/_man
@@ -14,12 +14,18 @@ if [[ -n $_comp_correct ]]; then
   approx="(#a${_comp_correct})"
 fi
 
-(( $#manpath )) || manpath=$(manpath 2>/dev/null) ||
+if (( ! $#manpath )); then
+  local mp=$(manpath 2>/dev/null)
+  [[ "$mp" == *:* ]] && mp=( ${(s.:.)mp} )
+  manpath=( $mp )
+fi
+
+(( $#manpath )) ||
   manpath=( /usr/man(-/N) /(opt|usr)/(dt|share|X11R6|local)/(cat|)man(-/N) )
 
 # `sman' is the SGML manual directory for Solaris 7.
 
-if [[ $words[2] = (<->*|ln) ]]; then
+if [[ $words[2] = (<->*|l|n) ]]; then
   rep=(
   $manpath/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
 else