|
| 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:
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.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.
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
| [Prev in Thread] | Current Thread | [Next in Thread] |