fix: dim path separators

This commit is contained in:
xeruf 2024-08-27 11:54:08 +03:00
parent 13dac88ded
commit 6492a22cc9
2 changed files with 3 additions and 3 deletions

View File

@ -338,7 +338,7 @@ async fn main() -> Result<()> {
let tasks = relays.get(&selected_relay).unwrap();
let prompt = format!(
"{} {}{}) ",
selected_relay.as_ref().map_or(LOCAL_RELAY_NAME.to_string(), |url| url.to_string()).bright_black(),
selected_relay.as_ref().map_or(LOCAL_RELAY_NAME.to_string(), |url| url.to_string()).dimmed(),
tasks.get_task_path(tasks.get_position()).bold(),
tasks.get_prompt_suffix().italic(),
);

View File

@ -283,7 +283,7 @@ impl Tasks {
join_tasks(self.traverse_up_from(id), true)
.filter(|s| !s.is_empty())
.or_else(|| id.map(|id| id.to_string()))
.unwrap_or(String::new())
.unwrap_or_default()
}
/// Iterate over the task referenced by the given id and all its available parents.
@ -976,7 +976,7 @@ pub(crate) fn join_tasks<'a>(
None.into_iter()
})
.fold(None, |acc, val| {
Some(acc.map_or_else(|| val.clone(), |cur| format!("{}>{}", val, cur)))
Some(acc.map_or_else(|| val.clone(), |cur| format!("{}{}{}", val, ">".dimmed(), cur)))
})
}