forked from janek/mostr
feat(main): enhance prompt formatting
This commit is contained in:
parent
0253b00c61
commit
c93b2f2d91
1 changed files with 4 additions and 7 deletions
11
src/main.rs
11
src/main.rs
|
@ -304,13 +304,10 @@ async fn main() {
|
||||||
println!();
|
println!();
|
||||||
let tasks = selected_relay.as_ref().and_then(|url| relays.get(url)).unwrap_or(&local_tasks);
|
let tasks = selected_relay.as_ref().and_then(|url| relays.get(url)).unwrap_or(&local_tasks);
|
||||||
print!(
|
print!(
|
||||||
"{} {}) ",
|
"{} {}{}) ",
|
||||||
selected_relay.as_ref().map_or("TEMP".to_string(), |url| url.to_string()).bright_black().italic(),
|
selected_relay.as_ref().map_or("TEMP".to_string(), |url| url.to_string()).bright_black(),
|
||||||
format!(
|
tasks.get_task_path(tasks.get_position()).bold(),
|
||||||
"{}{}",
|
tasks.get_prompt_suffix().italic(),
|
||||||
tasks.get_task_path(tasks.get_position()),
|
|
||||||
tasks.get_prompt_suffix()
|
|
||||||
).bold()
|
|
||||||
);
|
);
|
||||||
stdout().flush().unwrap();
|
stdout().flush().unwrap();
|
||||||
match lines.next() {
|
match lines.next() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue