[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Feature request: prompt strings in output from edit-and-execute-command
From: |
Zachary Santer |
Subject: |
Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ) |
Date: |
Sat, 3 Feb 2024 22:18:05 -0500 |
On Fri, Feb 2, 2024 at 4:21 PM Chet Ramey <chet.ramey@case.edu> wrote:
> OK, I'll take that as a feature request for a future version.
>
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.
PS1s and PS2s:
zsant@Zack2021HPPavilion MINGW64 ~
$ var='duck'
zsant@Zack2021HPPavilion MINGW64 ~
$ declare -p var
declare -- var="duck"
zsant@Zack2021HPPavilion MINGW64 ~
$ (
> var='squirrel'
> declare -p var
> )
declare -- var="squirrel"
zsant@Zack2021HPPavilion MINGW64 ~
$ declare -p var
declare -- var="duck"
All PS2s:
> var='duck'
> declare -p var
declare -- var="duck"
> (
> var='squirrel'
> declare -p var
> )
declare -- var="squirrel"
> declare -p var
declare -- var="duck"
I do think I prefer all PS2s, myself. Makes a distinction between things
entered in a text editor with edit-and-execute-command and things entered
directly on the command line, and also makes a distinction between commands
and their output.
Would be nice.
Zack
- Re: About `M-C-e` expand result `'` failed, Andreas Schwab, 2024/02/01
- Re: About `M-C-e` expand result `'` failed, Zachary Santer, 2024/02/01
- Re: About `M-C-e` expand result `'` failed, Chet Ramey, 2024/02/02
- Re: About `M-C-e` expand result `'` failed, Zachary Santer, 2024/02/02
- Re: About `M-C-e` expand result `'` failed, Chet Ramey, 2024/02/02
- Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ),
Zachary Santer <=
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Oğuz, 2024/02/03
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Chet Ramey, 2024/02/06
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Oğuz, 2024/02/06
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Chet Ramey, 2024/02/06
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Chet Ramey, 2024/02/06
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Zachary Santer, 2024/02/06
- Re: About `M-C-e` expand result `'` failed, Martin D Kealey, 2024/02/04