5

I used to read info bash, using the info utility, but that seems gone now and it's extremely hard to search for any info (pun intended) about it. Any alternatives? Pointers?

I'm using Sonoma 14.4.1, but I think it's been gone starting with Ventura.

3
  • What version of macOS are you on? info still exists on Catalina
    – Allan
    Apr 12 at 9:25
  • @Allan Catalina is old - it is not there on Ventura
    – mmmmmm
    Apr 12 at 9:29
  • 1
    The info command still appears in Monterey (macOS 12.5). Apr 12 at 9:40

3 Answers 3

3

info is a GNU application to read info files. Info files are a form of marked up documentation, the format was defined before HTML.

The UNIX standard documentation is man pages or the --help argument on the command line but info pages are usually longer and give broader and also more detailed information than man pages. From Wikipedia the rationale for not using just man pages is

that man pages have a strict conventional format, used traditionally as quick reference guides, whereas typical Texinfo applications are for tutorials as well as reference manuals. As such, no benefit is seen in expressing Texinfo content in man page format.

From GNU

Info files are typically the result of processing Texinfo files with the program texi2any (also in the Texinfo distribution).

TextInfo files can also be processed to provide HTML (and other formats) See the output for info on the web (bash is here) The text and linking will be the same as the info files.

info is available from gnu to be compiled and built or more easily from a package manager like MacPorts or HomeBrew.

I suspect that nowadays the only documentation that is available is for GNU projects like bash and especially Emacs as anything else will use one of the defacto standards like HTML or Markdown or more likely not bother with providing documentation more than a cryptic description of command line flags in a man page.

As for why it is not on macOS anymore we can only guess, but is probably due to info being released under GPLv3 and Apple does not release anything under that license. Which is why bash is a very old version and emacs is not provided any more.

1
  • Thank you. Sometimes it was useful to have access to the more comprehensive docs from the shell, but a PDF/HTML manual is fine too (assuming one exists...). Apr 12 at 11:05
7

The info command was removed starting with macOS Ventura. As already stated in the OP's answer, the info command is available via Homebrew's texinfo formulae. However, if you are using the version of bash (which currently is 3.2.57(1)-release) that came with Ventura or Sonoma and have not upgraded bash, then you will need to install the bash.info file that Apple has published on GitHub. This file has not changed since at least Monterey (macOS 12.5). Here is the Sonoma (macOS 14.4) source code website where you can download the bash.info file. You will need to move this download to /usr/local/share/info/bash.info by entering the commands given below.

xattr -c ~/Downloads/bash.info
chmod a-w ~/Downloads/bash.info
mv ~/Downloads/bash.info /usr/local/share/info

Below is the output from the ls -lO@e /usr/local/share/info/bash.info from my Mac. This was after moving the file.

-r--r--r--  1 davidanderson  staff  - 408792 Apr 12 08:17 /usr/local/share/info/bash.info

An alternative to using the info command would be to open the bash man page. An example of doing this for various commands is given in this answer.


The latest available Homebrew version of bash can be found at here. (Currently, this is version 5.2.26(1)-release.) Using this formulae will require replacing any existing /usr/local/share/info/bash.info with a symbolic link.

After installing this Homebrew version of bash, an alternative to using the info command would be to open the bash man page as a local web document. The command is given below.

open /usr/local/Cellar/bash/5.2.26/share/doc/bash/bash.html

Or, use the following link.

file:///usr/local/Cellar/bash/5.2.26/share/doc/bash/bash.html

Another alternative would be to open the Bash Reference Manual as a local web document. The command is given below.

open /usr/local/Cellar/bash/5.2.26/share/doc/bash/bashref.html

Or, use the following link

file:///usr/local/Cellar/bash/5.2.26/share/doc/bash/bashref.html

Appendix

For those who are new to the info command, below is a partial list of navigation keys.

Key Action
Down arrow To move to the next line
Up arrow To move to the previous line
Spacebar To move to the next page
Del To move to the previous page
] To move to the next node
[ To move to the previous node
t To move to the top node of the document
s To search a string in the forward direction
{ To search the previous occurrence of the string
} To search the next occurrence of the string
q To quit from the document

References

0

It seems it's available via Homebrew under the texinfo formula. Once installed, I can access info bash just fine.

0

You must log in to answer this question.

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