Date: Sun, 18 Aug 2024 02:09:10 +0200 From: Milana <948...@riseup.net> Message-ID: <e72ff43d-868f-4d36-99cf-1be53d25f...@riseup.net>
| I recently encountered an issue while experimenting with different shell | options in Bash. When launching Bash with both the `-n` (noexec) and `-o | ignoreeof` flags in interactive mode (with no pipes or redirection), | pressing `^D` (EOF) results in the message: "Use 'exit' to leave the | shell." The NetBSD shell has a different approach to that issue. Whenever an interactive shell is about to prompt for a new command, it does the internal equivalent of "set +n" (which in bash, I am guessing from your patch, would be something like "executing = 1;") Interactive shells with -n (noexec) set are pointless - being able to set it isn't always, but keeping it set certainly is. I's suggest that bash do the same, rather than telling some poor user to type another 99 ^D (or whatever) characters. kre