nushell / reedline

A feature-rich line editor - powering Nushell
https://docs.rs/reedline/
MIT License
551 stars 155 forks source link

[QUESTION]: can I disable the indicator #765

Closed SteveLauC closed 8 months ago

SteveLauC commented 8 months ago

Thanks for creating this amazing library!

When setting my prompt with:

    let prompt = DefaultPrompt::new(
        DefaultPromptSegment::Basic(if success {
            "V ".green().to_string()
        } else {
            "V ".red().to_string()
        }),
        DefaultPromptSegment::Empty,
    );

I noticed that there is an arrow sign right after my prompt:

image

Is there any way to disable this indicator?

fdncred commented 8 months ago

This is called the prompt indicator. If you look at the custom_prompt example you will see how to set the prompt indicator. I believe you just have to set it to "" but I'm not sure there is a way with the DefaultPrompt.

SteveLauC commented 8 months ago

This is called the prompt indicator. If you look at the custom_prompt example you will see how to set the prompt indicator. I believe you just have to set it to "" but I'm not sure there is a way with the DefaultPrompt.

Thanks for the quick response! I will implement my own prompt:)