mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-17 15:01:40 +02:00
39194: _man (Solaris): Ignore man-index. Support multiple sections in the -s flag's argument.
This commit is contained in:
parent
7d98ac7cd5
commit
999e1ac64e
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2016-09-07 Danek Duvall <duvall@comfychair.org>
|
||||||
|
|
||||||
|
* 39194: Completion/Unix/Command/_man: _man (Solaris): Ignore
|
||||||
|
man-index. Support multiple sections in the -s flag's argument.
|
||||||
|
|
||||||
2016-09-07 Oliver Kiddle <opk@zsh.org>
|
2016-09-07 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
* unposted: Completion/Unix/Command/_rm: fix to use ;|
|
* unposted: Completion/Unix/Command/_rm: fix to use ;|
|
||||||
|
|
|
@ -46,6 +46,7 @@ _man() {
|
||||||
local sect sect_dirname
|
local sect sect_dirname
|
||||||
if [[ $OSTYPE = solaris* ]]; then
|
if [[ $OSTYPE = solaris* ]]; then
|
||||||
sect=${${words[(R)-s*]#-s}:-$words[$words[(i)-s]+1]}
|
sect=${${words[(R)-s*]#-s}:-$words[$words[(i)-s]+1]}
|
||||||
|
sect="${sect//,/|}"
|
||||||
elif [[ -n ${sect:=$words[$words[(i)-S]+1]} || -n ${sect:=$MANSECT} ]]; then
|
elif [[ -n ${sect:=$words[$words[(i)-S]+1]} || -n ${sect:=$MANSECT} ]]; then
|
||||||
sect="${sect//:/|}"
|
sect="${sect//:/|}"
|
||||||
sect="${sect//,/|}"
|
sect="${sect//,/|}"
|
||||||
|
@ -67,6 +68,8 @@ _man() {
|
||||||
dirs=( $^_manpath/(sman|man|cat)*/ )
|
dirs=( $^_manpath/(sman|man|cat)*/ )
|
||||||
awk='{print $1}'
|
awk='{print $1}'
|
||||||
fi
|
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
|
if [[ $OSTYPE = solaris* && ( $words[CURRENT] = -s* || $words[CURRENT-1] == -s ) ]]; then
|
||||||
[[ $words[CURRENT] = -s* ]] && compset -P '-s'
|
[[ $words[CURRENT] = -s* ]] && compset -P '-s'
|
||||||
sects=( ${(o)${dirs##*(man|cat)}%/} )
|
sects=( ${(o)${dirs##*(man|cat)}%/} )
|
||||||
|
|
Loading…
Reference in a new issue