3

I've been unable to correctly set up a MANPATH environment variable in msysgit (1.9.0; 20140217) on Windows 7 (which is not my main concern here). Every time I execute the man command, I recieve the following errors:

  1. /usr/local/lib/man.config: No such file or directory.
  2. Warning: Cannot open local configuration file /usr/local/lib/man.config.
  3. No manual page for {command}

As stated above, this is not a concern, merely an inconvenience as I know it's possible to use groff [something] -T ascii /path/to/manpage to display manpages. However, I am unable to find the command necessary to do so, having searched SE. (I know there was a question asking for it, but it doesn't show in my searches.) As a work-around, I've been using online manpages, but I'd prefer not to search the Web every time I want to view a manpage.

So, first prize is the groff command for displaying man pages and the second is instructions on how to set up man.config (including file contents) for msysgit.

1 Answer 1

7
groff -man -Tascii < /path/to/manpage/without/gz | less

EG:

groff -man -Tascii < C:/Programs/msysgit/mingw/man/man1/gcc.1 | less

Note: Although switching shells is not needed here, mysysgit uses sh (not bash) as the default shell. Thanks to devnull for pointing thatr out.

5
  • So you could use bash when you were given the answer earlier. Is it your habit to act in this manner?
    – devnull
    Apr 12, 2014 at 12:14
  • I fail to understand what you're asking me. Is it my habit to tell somebody when the solution they provide doesn't work? Yes, it is. Apr 12, 2014 at 12:16
  • 2
    (1) It's evident that all you needed to know was the -man option. After learning that you realized that an answer is not useful for you. (2) There is nothing in the command posted by you that would require bash and not work in sh. (3) You should really consider providing enough information in your question: shell being used, format of man pages ...
    – devnull
    Apr 12, 2014 at 12:21
  • 1. Yes, that's true. 2. Perhaps. 3. I didn't know these factors at the time of posting the question, so didn't include them. Apr 12, 2014 at 12:23
  • 1
    -Tutf8 is probably a more sensible default nowadays (instead of -Tascii) May 11 at 0:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .