I installed the keg-only readline
> brew info readline
readline: stable 7.0.1 (bottled) [keg-only]
Library for command-line editing
https://tiswww.case.edu/php/chet/readline/rltop.html
/usr/local/Cellar/readline/7.0 (45 files, 2M)
Poured from bottle on 2016-11-22 at 22:40:10
/usr/local/Cellar/readline/7.0.1 (46 files, 2M)
Poured from bottle on 2016-12-03 at 22:44:53
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/readline.rb
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include
This package installs manpages:
> brew ls -v readline | grep man
/usr/local/Cellar/readline/7.0.1/share/info/rluserman.info
/usr/local/Cellar/readline/7.0.1/share/man/man3/history.3
/usr/local/Cellar/readline/7.0.1/share/man/man3/readline.3
/usr/local/Cellar/readline/7.0.1/share/readline/fileman.c
/usr/local/Cellar/readline/7.0.1/share/readline/manexamp.c
I can't see the manual. I get No manual entry for readline
.
Howto view the manual with man readline
?
Best Answer
The
-M
option forman
allows you to specify a path. The exact command you're looking for is:Note that the number after the
-M
specifies the "man
page section", which is the last character in the file path. For example, I have two versions ofsshd
installed and I read can both theirman
pages with the following commands:I'm curious why
brew
didn't symlinkreadline
, sincebrew
'sreadline
is the only one installed - presumably past versions (I'm on Sierra) of macOS did havereadline
? I'd tend to be conservative here, and honourbrew
's decision as far as possible - just in case Apple decide to installreadline
again with a future OS upgrade. That being said, you could manually symlinkreadline
:The risk with this is that - if Apple do install
readline
in the future - you'll end up with Apple'sreadline
in your $PATH (and notbrew
's, since it's keg-only and hasn't been linked), butbrew
'sreadline
will occur first in your $MANPATH, before theman
page for Apple'sreadline
.