Bug#892307: fixed in bash-completion 1:2.8-1
On Sun, 2018-05-06 at 16:16 -0300, Gabriel F. T. Gomes wrote: > I can definitely send this upstream, but since you have already > provided the solution in the bug report, may I set the author name to > "Paul Wise" in the patch (git commit)? That is fine by me. I think single-letter options are more likely to function differently between man implementations than long options, so long ones are better. I noticed in the Debian manual page for man that there are actually four options that can be used for printing the manual page path: -w --where --path --location I'm assuming these are compatibility options for other operating systems. I'd suggest that before committing, you go through each of the Linux man implementations (at least Debian, Fedora, Gentoo), each of the open source BSD ones and the ones for proprietary UNIXen like macOS, Solaris, HPUX. Then order the solutions by how common they are. I wonder if any man implementations actually have a way to do completion without the shell parts having to do the completion. -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#892307: fixed in bash-completion 1:2.8-1
On 02 Apr 2018, Paul Wise wrote: >On Sun, 2018-04-01 at 18:19 +, Gabriel F. T. Gomes wrote: > >>* Fix regression when MANPATH is set with colons (Closes: >> #892307) > >I noticed the upstream version of the fix misses these things: > > * falling back on `man --path` when the man implementation does not > have support for `manpath` and `man -w` > * falling back on $MANPATH when the man implementation does not have > support for printing the manual pages paths > >Would it be possible for one of you to send them a fix for that? Sorry for taking so long to reply to this. I can definitely send this upstream, but since you have already provided the solution in the bug report, may I set the author name to "Paul Wise" in the patch (git commit)? It would look like this: Author: Paul Wise Date: Sun May 6 16:09:58 2018 -0300 Fallbacks for man completion The commit commit e6a471511dfdc230ff3eed65ccba09b6d7d30262 Author: Pawel Date: Wed Sep 27 06:34:59 2017 +0200 man: Don't use $MANPATH directly (#161) fixes the behavior of man completion when MANPATH is set, however, it misses the following: * falling back on `man --path` when the man implementation does not have support for `manpath` and `man -w` * falling back on $MANPATH when the man implementation does not have support for printing the manual pages paths This patch addresses them. diff --git a/completions/man b/completions/man index 0668b8ee..d0068fc7 100644 --- a/completions/man +++ b/completions/man @@ -51,7 +51,8 @@ _man() return fi -local manpath=$( manpath 2>/dev/null || command man -w 2>/dev/null ) +local manpath=$( manpath 2>/dev/null || command man -w 2>/dev/null || command man --path 2>/dev/null ) +[[ -z $manpath ]] && manpath=$MANPATH [[ -z $manpath ]] && manpath="/usr/share/man:/usr/local/share/man" # determine manual section to search
Bug#892307: fixed in bash-completion 1:2.8-1
On Sun, 2018-04-01 at 18:19 +, Gabriel F. T. Gomes wrote: >* Fix regression when MANPATH is set with colons (Closes: #892307) I noticed the upstream version of the fix misses these things: * falling back on `man --path` when the man implementation does not have support for `manpath` and `man -w` * falling back on $MANPATH when the man implementation does not have support for printing the manual pages paths Would it be possible for one of you to send them a fix for that? -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part