Closed GoogleCodeExporter closed 8 years ago
XMonad.Prompt.Man seems to be written for users of man-db
<http://man-db.nongnu.org/>, which does have a -g flag.
Original comment by vogt.a...@gmail.com
on 8 Jul 2013 at 3:04
That would explain it.
Gentoo (CentOS too AFAIK) still uses the standard man, but migration to man-db
is in progress (Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=284822).
I think the only proper solution is to parse the version as printed out by
`manpath -V` (this option seems to be in both versions, although the standard
manpath does not advertize it).
Output from standard man `manpath -V` on current Gentoo 64
manpath, version 1.6g # <- note the comma
# <- yes, that's one extra blank line ...
Output from man-db `manpath -V` on Debian 6
manpath 2.5.7
I've attached a working example of such parsing and a patch that should fix the
problem. I'm a beginner in Haskell, but it could be of some use perhaps.
Original comment by ondrej.g...@gmail.com
on 8 Jul 2013 at 6:14
Attachments:
Original comment by vogt.a...@gmail.com
on 10 Jul 2013 at 12:55
I don't have a system with the other man to test, but it works if one of the
two calls to getCommandOutput gives an empty String:
Mon Jul 15 23:05:36 EDT 2013 Adam Vogt
* Fix issue 551 by also getting manpath without -g flag.
Instead of taking Ondrej's approach of figuring out which man (man-db or
http://primates.ximian.com/~flucifredi/man/) is used by the system, just try
both sets of flags.
Original comment by vogt.a...@gmail.com
on 16 Jul 2013 at 3:17
Until this fix gets into a release, here's a simple workaround that does not
require hacking XMonad in any way:
Put the attached manpath script into your private script directory in your PATH
(it must precede the original manpath) and make it executable
Example:
1. put it in ~/bin/ (`mkdir -p ~/bin; mv ~/Downloads/manpath ~/bin/`) and make it executable (`chmod a+x ~/bin/manpath`)
2. put 'export PATH="~/bin:${PATH}"' in your ~/.bashrc (`echo 'export PATH="~/bin:${PATH}"' >> ~/.bashrc`)
Original comment by ondrej.g...@gmail.com
on 11 Sep 2013 at 7:46
Attachments:
Original issue reported on code.google.com by
ondrej.g...@gmail.com
on 7 Jul 2013 at 7:13Attachments: