Issue 551 in xmonad: XMonad.Prompt.Man.manPrompt uses `manpath -g`, -g appears to be an invalid option

Status: New Owner: ---- New issue 551 by ondrej.g...@gmail.com: XMonad.Prompt.Man.manPrompt uses `manpath -g`, -g appears to be an invalid option http://code.google.com/p/xmonad/issues/detail?id=551 What steps will reproduce the problem? 1. import XMonad.Prompt.Man and set up manPrompt 2. activate and use manPrompt 3. What is the expected output? What do you see instead? manPrompt should provide man pages completion but it shows only CWD directories as completion What version of the product are you using? On what operating system? Gentoo 64bit Linux kernel 3.7.10-gentoo-r1 xmonad and xmonad contrib v 0.11 standard man v 1.6g (from http://primates.ximian.com/~flucifredi/man/) Are you using an xmonad.hs? Please attach it and the output of "xmonad --recompile". no output from xmonad --recompile, xmonad.hs attached (clean, not the source of the problem) Please provide any additional information below. The whole problem is the line in getMans paths <- getCommandOutput "manpath -g 2>/dev/null" `E.catch` on my system, manpath does not have the -g option so it fails silently and does not output any paths, so then the CWD path is examined instead I don't know when this option was removed, man v 1.6f doesn't have it either. Attachments: xmonad.hs 6.2 KB -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #1 on issue 551 by vogt.a...@gmail.com: XMonad.Prompt.Man.manPrompt uses `manpath -g`, -g appears to be an invalid option http://code.google.com/p/xmonad/issues/detail?id=551 XMonad.Prompt.Man seems to be written for users of man-db http://man-db.nongnu.org/, which does have a -g flag. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #2 on issue 551 by ondrej.g...@gmail.com: XMonad.Prompt.Man.manPrompt uses `manpath -g`, -g appears to be an invalid option http://code.google.com/p/xmonad/issues/detail?id=551 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. Attachments: manpath_parse.hs 364 bytes Xmonad_Prompt_Man.hs.diff 1.4 KB -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings
participants (1)
-
codesite-noreply@google.com