bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: prompt strings in output from edit-and-execute-comm


From: Chet Ramey
Subject: Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed )
Date: Tue, 6 Feb 2024 15:06:59 -0500
User-agent: Mozilla Thunderbird

On 2/3/24 10:18 PM, Zachary Santer wrote:

While I'm making feature requests.

I hit C-x C-e and enter the following into my editor:

var='duck'
declare -p var
(
   var='squirrel'
   declare -p var
)
declare -p var

I save that and exit my editor, and this is what I get in the terminal:

zsant@Zack2021HPPavilion MINGW64 ~
$
var='duck'
declare -p var
declare -- var="duck"
(
   var='squirrel'
   declare -p var
)
declare -- var="squirrel"
declare -p var
declare -- var="duck"

Kinda confusing, right?

I could see adding PS1 and PS2 prompts where they would've been, had I typed all my commands into the terminal directly. PS2 prompts in front of everything that was entered in the editor might be preferable, though, given the complex PS1s you see sometimes.

I'd have to think about it. This isn't interactive input read from the
keyboard, where you'd expect to get a prompt. This is more like sourcing
a file with `set -v' temporarily enabled (in fact, it's very close to
that).

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]