[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make info fail if an infopage is not available?
From: |
Gavin Smith |
Subject: |
Re: How to make info fail if an infopage is not available? |
Date: |
Sun, 25 Apr 2021 12:16:02 +0100 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Thu, Apr 22, 2021 at 10:13:10AM +0300, Eli Zaretskii wrote:
> > From: Peng Yu <pengyu.ut@gmail.com>
> > Date: Wed, 21 Apr 2021 19:48:36 -0500
> >
> > It seems that info may just print manpage if the infopage is not
> > available. Is there a way to just let it fail if it doesn't find the
> > infopage instead of defaulting to a manpage? Thanks.
>
> Invoke Info as "info -f FILE", then it will fail if FILE.info cannot
> be found.
This does work as long as you know the file name. If the Info node
is contained in a larger manual it won't find it this way, e.g.
"info ls" may work if the dir file is up to date, but "info -f ls" won't.
It can actually be done by setting the INFO_MAN_COMMAND variable to "false"
in the environment (this is not documented anywhere and I found this by
checking the source code, but this is not going to change). Put something
like "export INFO_MAN_COMMAND=false" in .bashrc or equivalent and info
won't show man pages.