On 2/3/22 4:09 PM, Per Bothner wrote:
On 2/3/22 12:36, Chet Ramey wrote:
An alternative idea: A user-settable highlight style for the *entire*
active input area - pasted text as well a directy-typed characters.
Even better: Two user-selectable styles, one for the current active
input area,
and one for previous input areas. (Once you type Enter, the highlight
style
of the input area is changed from the current-input to previous-input
style.)
I've implemented support for something like this in my DomTerm
terminal emulator, and I think it is pretty nice.
What's the `active input area'? A series of characters bound to self-
insert? And what delimits it? A character bound to an editing command?
By "active input area" I mean the text in the terminal that can be edited:
what gets sent to the application on Enter. More precisely, the section
of the visible terminal corresponding to that text. The area after the
prompt,
and up to the last entered (or pasted) character.
Then you can essentially do that now, using $PROMPT_COMMAND and $PS0.
I just don't see any particular advantage to doing it.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/