This hasn't been committed. Matthew Martin wrote on Thu, May 19, 2016 at 00:07:25 -0500: > I couldn't figure out what was the purpose for using $~sect, so I just > dropped the tilde. I found it: -S list, -s list, --sections=list List is a colon- or comma-separated list of `order specific' manual sections to search. This option overrides the $MANSECT environment variable. (The -s spelling is for compatibility with System V.) That's on linux; the 'else if' branch just above the diff context implements that syntax. 896f43c broke that syntax too: the new %% causes a pattern syntax error. Your patch doesn't fix this problem (since it keeps the %%). I'm therefore attaching an alternative patch which I believe will fix both that issue and the issue you originally saw: > 896f43c broke completion for man 3p on OpenBSD because those man > pages are in /usr/share/man/man3p. Testing on various OSes would be appreciated. Thanks, Daniel > > > diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man > index 0534db7..9aec833 100644 > --- a/Completion/Unix/Command/_man > +++ b/Completion/Unix/Command/_man > @@ -52,7 +52,7 @@ _man() { > fi > > if [[ $sect = (<->*|1M|l|n) || $sect = \(*\|*\) ]]; then > - dirs=( $^_manpath/(sman|man|cat)${~sect%%[^0-9]#}/ ) > + dirs=( $^_manpath/(sman|man|cat)($sect|${sect%%[^0-9]#})/ ) > awk="\$2 == \"$sect\" {print \$1}" > else > dirs=( $^_manpath/(sman|man|cat)*/ ) >