[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58370] interpreter doesn't accept multiline i
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #58370] interpreter doesn't accept multiline input in interactive mode |
Date: |
Thu, 14 May 2020 18:17:42 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?58370>
Summary: interpreter doesn't accept multiline input in
interactive mode
Project: GNU Octave
Submitted by: mtmiller
Submitted on: Thu 14 May 2020 03:17:40 PM PDT
Category: Interpreter
Severity: 1 - Wish
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
It would be a nice and consistent feature if the interpreter accepted and
handled multiline input when running in interactive mode.
This would allow editing complex multiline expressions and executing them at
once at the terminal prompt, allow using readline bracketed paste mode with
multiple lines of commands/functions, and be more consistent with bash and
other readline-based interpreters.
A very simple example that does not work for me with Octave from the default
branch
true
false
Copy and paste these two lines of text with 'enable-bracketed-paste' enabled
in the readline config file ~/.inputrc. Or, at the Octave prompt, type 'true',
followed by Ctrl+v and Ctrl+j to start a new line, then type 'false', followed
by Enter. Only the first command is executed in both cases, the rest of the
text seems to be eaten and ignored by the lexer.
My best guess is the lexer is designed to be line-oriented only when running
in interactive mode, and when it sees a newline it immediately stops and
discards the rest of the input buffer, assuming that the newline is the end of
input.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58370>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58370] interpreter doesn't accept multiline input in interactive mode,
Mike Miller <=