Add support to render right prompt on last line of the prompt (#6781)

* Add support to render right prompt on last line of the prompt

* reset reedline to main branch

* update reedline to fix right prompt to be rendered correctly

* reset reedline to main branch again
This commit is contained in:
nibon7
2022-10-23 22:18:26 +08:00
committed by GitHub
parent 17b2bcc125
commit ebca840d91
8 changed files with 31 additions and 6 deletions

View File

@ -84,6 +84,7 @@ pub struct Config {
pub trim_strategy: TrimStrategy,
pub show_banner: bool,
pub show_clickable_links_in_ls: bool,
pub render_right_prompt_on_last_line: bool,
}
impl Default for Config {
@ -121,6 +122,7 @@ impl Default for Config {
trim_strategy: TRIM_STRATEGY_DEFAULT,
show_banner: true,
show_clickable_links_in_ls: true,
render_right_prompt_on_last_line: false,
}
}
}
@ -431,6 +433,13 @@ impl Value {
eprintln!("$config.show_clickable_links_in_ls is not a bool")
}
}
"render_right_prompt_on_last_line" => {
if let Ok(b) = value.as_bool() {
config.render_right_prompt_on_last_line = b;
} else {
eprintln!("$config.render_right_prompt_on_last_line is not a bool")
}
}
x => {
eprintln!("$config.{} is an unknown config setting", x)
}