Set interactive automatically even with positional parameters#160
Merged
Conversation
POSIX.1-2024 changed the wording of the condition under which the shell automatically becomes interactive. There may be some positional parameters as long as the shell is reading commands from the standard input and the standard input and standard error are both connected to a terminal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
POSIX.1-2024 changed the wording of the condition under which the shell automatically becomes interactive. There may be some positional parameters as long as the shell is reading commands from the standard input and the standard input and standard error are both connected to a terminal.
Fixes #100
Summary by Copilot
This pull request introduces a change to the behavior of the shell when determining whether to enter interactive mode. The shell now becomes interactive if it is reading commands from standard input and both standard input and standard error are connected to a terminal, regardless of whether a command-line operand is provided. The changes include updates to documentation and source code to reflect this new behavior.
Behavioral Changes:
+i(++interactive) option is not specified, the-s(--stdin) option is specified (explicitly or implicitly), and both standard input and standard error are connected to a terminal. Previously, this behavior required no command-line operand as well. (yash.c: yash.cL206-R206)Documentation Updates:
doc/invoke.txtto describe the new conditions under which the shell becomes interactive. (doc/invoke.txt: doc/invoke.txtR59-R65)doc/ja/invoke.txtwith the equivalent explanation in Japanese for the new interactive mode behavior. (doc/ja/invoke.txt: doc/ja/invoke.txtR25-R30)Release Notes:
NEWSto highlight the new behavior for determining interactive mode. (NEWS: NEWSR38-R41)NEWS.jafor Japanese users. (NEWS.ja: NEWS.jaR29-R32)