You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let selected_index = FuzzySelect::with_theme(&theme).with_prompt("Which partition do you want to mount?").header(format!(" {}\n {:11}{:8}{:7}{:15}{}\n {}","-".repeat(58),"name","fstype","size","label","partlabel","-".repeat(58),)).footer(format!(" {}","-".repeat(58))).items(&items).default(0).interact_opt().context("Failed to start interactive question.")?
.unwrap_or_else(|| process::exit(1));
Where header will go under the prompt/cursor and before the first item. Footer goes after the first item. By default, there should be no header/footer. The only way I see right now fixing the implicit LF being inserted when header/footer is set is to use enum. So if they are set, then you would need to wrap your string in Some() and by default it is None.
Then also add the header_style and footer_style to the ColorfulTheme.
So basically I want this library to provide a nice way to create "tables" or just frames/borders to make prompts look even prettier.
Header can't go above the prompt, because this can be achieved by redefining the prompt_prefex (which is also not ideal if it has to be more than a few chars, but a good first middle ground).
The text was updated successfully, but these errors were encountered:
Right now I only was able to make something like this:
But I had to redefine the style:
And separately also define the item's Display trait implementation:
I want to use this:
Where header will go under the prompt/cursor and before the first item. Footer goes after the first item. By default, there should be no header/footer. The only way I see right now fixing the implicit LF being inserted when header/footer is set is to use enum. So if they are set, then you would need to wrap your string in Some() and by default it is None.
Then also add the
header_style
andfooter_style
to theColorfulTheme
.So basically I want this library to provide a nice way to create "tables" or just frames/borders to make prompts look even prettier.
Header can't go above the prompt, because this can be achieved by redefining the
prompt_prefex
(which is also not ideal if it has to be more than a few chars, but a good first middle ground).The text was updated successfully, but these errors were encountered: