Skip to content

Support semantic prompts (OSC 133) #1808

Description

@TheDaemoness

What new feature should Elvish have?

There doesn't appear to be an option in edit for the elvish editor to automatically emit OSC 133 codes. These codes allow REPLs/shells to inform a terminal about the structure of their output, enabling features like those of the late Final Term or just wezterm.

This would be possible to implement oneself in rc.elv, except OSC escape codes emitted by the prompt are escaped (heh), which means OSC 133 B (the one that separates the prompt from user input) cannot be emitted at the end of the prompt. Emitting it at the end of edit:before-readline makes the prompt considered part of user input (at least by wezterm), which is unideal.

I'm not much of a Go person, but if there's maintainer interest in this feature, I could probably submit a PR for it.

Output of "elvish -version"

0.20.1+archlinux4

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    ❓Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions