6

Does info (GNU texinfo 4.13) have a default search path for finding a dir file? Is it /usr/share/info? Even though I don't have an INFOPATH variable set in my environment, it seems to use the dir file in the path above.

Relatedly, I have a script that sets up a directory with an alternate info directory structure. It does set a valid INFOPATH environment variable but info seems not to use it as invocation simply gives a blank screen without any menu items.

Any guidance on how info progresses in searching the path?

2 Answers 2

7

Yes, info does have a default value for INFOPATH compiled-in that it uses if you don't have INFOPATH set in your environment. (Also, if your INFOPATH ends with a colon, then the default path is appended to your value.)

The default DEFAULT_INFOPATH is .:/usr/local/info:/usr/info:/usr/local/lib/info:/usr/lib/info:/usr/local/gnu/info:/usr/local/gnu/lib/info:/usr/gnu/info:/usr/gnu/lib/info:/opt/gnu/info:/usr/share/info:/usr/share/lib/info:/usr/local/share/info:/usr/local/share/lib/info:/usr/gnu/lib/emacs/info:/usr/local/gnu/lib/emacs/info:/usr/local/lib/emacs/info:/usr/local/emacs/info (but it can be changed by defining DEFAULT_INFOPATH while compiling info).

There's also a INFODIR variable that can be set while compiling info. If set, it gets included in the path after the INFOPATH environment variable but before the DEFAULT_INFOPATH.

I don't know any way of asking your info program what values it was compiled with. (Although you can probably find the actual value of DEFAULT_INFOPATH with this command:)

strings `which info` | grep /info:
2

The search order that info is taking to find files and nodes can be examined by invoking it with the various --debug options (--debug -1 for all debug info).

For example

INFOPATH=: info --debug -1 _

will print out all the paths derived from $PATH, followed by all the compile-time defaults.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.