[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60696] octave --interactive should not imply
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal |
Date: |
Thu, 3 Jun 2021 08:04:08 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #5, bug #60696 (project octave):
I think the -i option for Octave was originally patterned after the same
option in bash. In bash, it is mostly about what happens when the shell
starts and exits and whether prompts are printed.
I'm not saying we have to follow the behavior of bash, but for comparison,
recent bash versions do this:
/* First, let the outside world know about our interactive status.
A shell is interactive if the `-i' flag was given, or if all of
the following conditions are met:
no -c command
no arguments remaining or the -s flag given
standard input is a terminal
standard error is a terminal
Refer to Posix.2, the description of the `sh' utility. */
if (forced_interactive || /* -i flag */
(!command_execution_string && /* No -c command and ... */
wordexp_only == 0 && /* No --wordexp and ... */
((arg_index == argc) || /* no remaining args or... */
read_from_stdin) && /* -s flag with args, and */
isatty (fileno (stdin)) && /* Input is a terminal and */
isatty (fileno (stderr)))) /* error output is a terminal. */
init_interactive ();
else
init_noninteractive ();
and interactive shells (whether forced with the -i option or because
stdin/stderr are connected to terminals) use line editing unless it is
explicitly disabled.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60696>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal, Rik, 2021/06/01
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal, Rik, 2021/06/02
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal, Mike Miller, 2021/06/02
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal, Rik, 2021/06/02
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal,
John W. Eaton <=
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal, John W. Eaton, 2021/06/03
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal, Mike Miller, 2021/06/03
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal, Mike Miller, 2021/06/03
- [Octave-bug-tracker] [bug #60696] octave --interactive should not imply --no-line-editing when running in a terminal, Rik, 2021/06/22