Skip to content

OSC sequences are malformed in a prompt #1855

@cpendery

Description

@cpendery

What happened, and what did you expect to happen?

Similar to #1836, I need to emit non-standard sequences in the prompt for microsoft/inshellisense#138. When trying to emit some OSC sequences prefixing the prompt as shown below, I get the following output in my terminal. It would be great if OSC sequences could be passed through directly to the terminal instead of being parsed / modified as shown below

command

var user_prompt = $edit:prompt
fn prompt {
    put "\x1b]6973;PS\x07"
    $user_prompt
}
set edit:prompt = { prompt }

resulting prompt

^[]6973;PS^G~\OneDrive - Microsoft\Documents\code\clac>

Output of "elvish -version"

0.21.0+official

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