Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get c++ man pages on os x?

In Ubuntu, after install libstdc++6-x.x-doc, docs are available via man, for example for libstdc++-4.8-doc:

man std::list
man std::weak_ptr
man std::ios_base

Is it possible to install man pages for c++ (using brew or any other means) on OSX? The reason for specifically requiring man pages is so that I can access them from vim using SHIFT-K.

Note: I'm using the XCode version of g++:

snowch$ g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
like image 582
Chris Snow Avatar asked Aug 30 '15 21:08

Chris Snow


People also ask

How do I get man pages on my Mac?

Try it on your Mac: Open Terminal, type man ls , then press Return. The ls command's man page is quite long, and you'll need to press the spacebar several times to get to the bottom. Sometimes, when you're viewing a man page, you need to go back up and look at something that's no longer visible.

How do you use console commands on a Mac?

In the Terminal app on your Mac, press the Up Arrow key. The last command you entered appears on the command line. Continue pressing the Up Arrow key until you see the command you want, then press Return.

How do I get to the man page in Linux?

To open the manual page of all sections, type man -a <page> . And note that the argument doesn't have to be a package name. It can be a command, a file, a function name, ...

How do I read a man page in Terminal?

How to Read Man Pages on Command Line. Using man is as simple as opening your Terminal emulator, or logging into your server via SSH. Once there, you can simply type man followed by the program you want to learn about. And the entire Git documentation will display in your screen using the less pager program.


1 Answers

You can install those man pages from here. Just run the following commands:

$ git clone https://github.com/jeaye/stdman
$ cd stdman
$ ./configure
$ make install # as a user with appropriate permissions to install
like image 128
Zach Avatar answered Sep 23 '22 11:09

Zach