Fri, 25 Mar 2011
Hello, this is your editor speaking, welcome to the "lesser known Linux feature
of the day" series. Today we will cover an interesting feature
man(1) that your editor has just ran into. Try running
the following command:
$ man git log
The manual page of
git-log(1) is displayed on my Fedora 14 system.
man know that git
provides a "
log" sub-command in addition to the equivalent
git-log standalone command?
The man page says:
By default, man will try to interpret pairs of manual page names given on the command line as equivalent to a single manual page name containing a hyphen. This supports the common pattern of programs that implement a number of subcommands, allowing them to provide manual pages for each that can be accessed using similar syntax as would be used to invoke the subcommands themselves.
And it even goes into an example using - guess what - git. That's all for today, see you next time!
2 replies for this story:
Adelton wrote: Not on F13
With man-1.6f-28.fc13.i686, I get man page for git and man page for log. Which version do you use?
Yenya wrote: Re: Not on F13
It is F14-only: man-db-2.5.7-7.fc14.x86_64