feat: table style
This commit is contained in:
@@ -3,6 +3,7 @@ use rust_util::util_clap::{Command, CommandError};
|
|||||||
use rust_util::XResult;
|
use rust_util::XResult;
|
||||||
use spki::der::Encode;
|
use spki::der::Encode;
|
||||||
use tabled::{Table, Tabled};
|
use tabled::{Table, Tabled};
|
||||||
|
use tabled::settings::Style;
|
||||||
use x509_parser::parse_x509_certificate;
|
use x509_parser::parse_x509_certificate;
|
||||||
use yubikey::{Certificate, YubiKey};
|
use yubikey::{Certificate, YubiKey};
|
||||||
use yubikey::piv::SlotId;
|
use yubikey::piv::SlotId;
|
||||||
@@ -62,7 +63,9 @@ impl Command for CommandImpl {
|
|||||||
print_summary_info(&mut yk, slot, &mut piv_slots, show_all, show_table).ok();
|
print_summary_info(&mut yk, slot, &mut piv_slots, show_all, show_table).ok();
|
||||||
}
|
}
|
||||||
if show_table {
|
if show_table {
|
||||||
println!("{}", Table::new(piv_slots).to_string());
|
let mut table = Table::new(piv_slots);
|
||||||
|
table.with(Style::rounded());
|
||||||
|
println!("{}", table.to_string());
|
||||||
}
|
}
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user