mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
fix: Fix incorrect prefix usage in cmd_duration module (#832)
Fixed the way the cmd_duration module is setting it's prefix to be the same as the other modules.
This commit is contained in:
committed by
Kevin Song
parent
8f645ffb8a
commit
197376633a
@@ -36,13 +36,11 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
};
|
||||
|
||||
module.set_style(module_color);
|
||||
let cmd_duration_stacked = &format!(
|
||||
"{}{}",
|
||||
config.prefix,
|
||||
render_time(elapsed, config.show_milliseconds)
|
||||
module.create_segment(
|
||||
"cmd_duration",
|
||||
&SegmentConfig::new(&render_time(elapsed, config.show_milliseconds)),
|
||||
);
|
||||
module.create_segment("cmd_duration", &SegmentConfig::new(&cmd_duration_stacked));
|
||||
module.get_prefix().set_value("");
|
||||
module.get_prefix().set_value(config.prefix);
|
||||
|
||||
Some(module)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user