forked from janek/mostr
fix: dim path separators
This commit is contained in:
parent
13dac88ded
commit
6492a22cc9
2 changed files with 3 additions and 3 deletions
|
@ -338,7 +338,7 @@ async fn main() -> Result<()> {
|
||||||
let tasks = relays.get(&selected_relay).unwrap();
|
let tasks = relays.get(&selected_relay).unwrap();
|
||||||
let prompt = format!(
|
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_task_path(tasks.get_position()).bold(),
|
||||||
tasks.get_prompt_suffix().italic(),
|
tasks.get_prompt_suffix().italic(),
|
||||||
);
|
);
|
||||||
|
|
|
@ -283,7 +283,7 @@ impl Tasks {
|
||||||
join_tasks(self.traverse_up_from(id), true)
|
join_tasks(self.traverse_up_from(id), true)
|
||||||
.filter(|s| !s.is_empty())
|
.filter(|s| !s.is_empty())
|
||||||
.or_else(|| id.map(|id| id.to_string()))
|
.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.
|
/// 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()
|
None.into_iter()
|
||||||
})
|
})
|
||||||
.fold(None, |acc, val| {
|
.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)))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue