bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

--rcfile and non existing files


From: Gioele Barabucci
Subject: --rcfile and non existing files
Date: Mon, 24 Jun 2024 22:36:50 +0200
User-agent: Mozilla Thunderbird

Hi,

the manpage states:

When an interactive shell that is not a login shell is started, bash
reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
these files exist.  […] The --rcfile file option will force bash to
read and execute commands from file instead of /etc/bash.bashrc and
~/.bashrc.
This wording suggests (or may suggest) that `bash --rcfile foo` will execute file `foo`, and complain if it contains an error or if it does not exists.

Instead, `bash --rcfile foo` will happily carry on if `foo` does not exist, probably applying the same logic used for `~/.bashrc`. https://bugs.debian.org/1042394 reports that this happen for `--init-file` as well.

Should the manpage be reworded to avoid stating "will force bash to read..."? Or should passing a non existing file to `--rcfile` turned into an error?

Regards,

--
Gioele Barabucci



reply via email to

[Prev in Thread] Current Thread [Next in Thread]