Skip to content

Commit

Permalink
slightly nicer styling of config keys (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Sep 23, 2022
1 parent 6abd5a4 commit eade88f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plumbing/progress.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crosstermion::crossterm::style::Stylize;
use owo_colors::OwoColorize;
use std::fmt::{Display, Formatter};
use tabled::{Style, TableIteratorExt, Tabled};
Expand Down Expand Up @@ -60,7 +61,11 @@ impl Tabled for Record {
const LENGTH: usize = 3;

fn fields(&self) -> Vec<String> {
vec![self.usage.icon().into(), self.config.into(), self.usage.to_string()]
let mut tokens = self.config.split(".");
let mut buf = vec![tokens.next().expect("present").bold().to_string()];
buf.extend(tokens.map(ToOwned::to_owned));

vec![self.usage.icon().into(), buf.join("."), self.usage.to_string()]
}

fn headers() -> Vec<String> {
Expand Down

0 comments on commit eade88f

Please sign in to comment.