summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorDanek Duvall <duvall@comfychair.org>2016-09-06 11:06:14 -0700
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-07 23:15:46 +0000
commit999e1ac64e69d552ab169ede3dd411b1afa1bce4 (patch)
tree292bc5fcd5d041bbc0e68cd7463449816ef34ab7 /Completion/Unix/Command
parent7d98ac7cd509ffc8221bb46323c040421347a3f3 (diff)
downloadzsh-999e1ac64e69d552ab169ede3dd411b1afa1bce4.tar.gz
zsh-999e1ac64e69d552ab169ede3dd411b1afa1bce4.tar.xz
zsh-999e1ac64e69d552ab169ede3dd411b1afa1bce4.zip
39194: _man (Solaris): Ignore man-index. Support multiple sections in the -s flag's argument.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_man3
1 files changed, 3 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man
index ae6ac38cc..b2aaeaf7e 100644
--- a/Completion/Unix/Command/_man
+++ b/Completion/Unix/Command/_man
@@ -46,6 +46,7 @@ _man() {
   local sect sect_dirname
   if [[ $OSTYPE = solaris* ]]; then
     sect=${${words[(R)-s*]#-s}:-$words[$words[(i)-s]+1]}
+    sect="${sect//,/|}"
   elif [[ -n ${sect:=$words[$words[(i)-S]+1]} || -n ${sect:=$MANSECT} ]]; then
     sect="${sect//:/|}"
     sect="${sect//,/|}"
@@ -67,6 +68,8 @@ _man() {
     dirs=( $^_manpath/(sman|man|cat)*/ )
     awk='{print $1}'
   fi
+  # Solaris 11 and on have a man-index directory that doesn't contain manpages
+  dirs=( ${dirs:#*/man-index/} )
   if [[ $OSTYPE = solaris* && ( $words[CURRENT] = -s* || $words[CURRENT-1] == -s ) ]]; then
     [[ $words[CURRENT] = -s* ]] && compset -P '-s'
     sects=( ${(o)${dirs##*(man|cat)}%/} )