Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: completion for "info -f" does not work



On 2022-03-18 14:59:53 +0100, Vincent Lefevre wrote:
> On 2022-03-16 17:46:28 +0900, Jun T wrote:
> > 'info -f' accept any (relative or absolute) pathnames.
> 
> Well, not exactly. It seems that the rule for "info -f" is that
> if the argument does not have a slash, then the usual info path
> is used (with no fallback if nothing is found, i.e. an existing
> pathname in the current directory will be ignored), otherwise
> the argument is regarded as a pathname.

This can be tested as follows:

zira% touch for-test-only.info
zira% info -f for-test-only
info: for-test-only: No such file or directory
zira% info -f for-test-only.info
info: for-test-only.info: No such file or directory
zira% info -f ./for-test-only
zira% info -f ./for-test-only.info
zira% info for-test-only
info: No menu item 'for-test-only' in node '(dir)Top'
zira% info for-test-only.info
info: No menu item 'for-test-only.info' in node '(dir)Top'
zira% info ./for-test-only
zira% info ./for-test-only.info
zira% 

An absence of error means that the file was opened.

Without "-f", the rules seem to be the same, except that info also
checks menu items.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




Messages sorted by: Reverse Date, Date, Thread, Author