mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-15 20:05:13 +02:00
Add bytesize and chrono, improve console output formatting
- Added `bytesize` and `chrono` dependencies in `Cargo.toml` and `Cargo.lock` for enhanced size and time formatting. - Enhanced console output in `list.rs`, `index.rs`, `clean.rs`, and `config.rs` with improved styles for readability. - Updated file size and modified time formatting across commands using `ByteSize` and `chrono`.
This commit is contained in:
parent
47d850843c
commit
17d327a572
6 changed files with 196 additions and 45 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
use std::path::{Path};
|
||||
use std::fs;
|
||||
use console::style;
|
||||
use toml;
|
||||
use crate::patterns::Severity;
|
||||
|
||||
|
|
@ -187,10 +188,15 @@ impl Config {
|
|||
let user_config: Config = toml::from_str(&user_config_content)?;
|
||||
|
||||
config = merge_configs(config, user_config);
|
||||
|
||||
println!("Loaded user config from: {}", user_config_path.display());
|
||||
|
||||
println!("{}: Loaded user config from: {}\n",
|
||||
style("note").green().bold(),
|
||||
style(user_config_path.display()).underlined().white().bold());
|
||||
} else {
|
||||
println!("Using default configuration. Create {} to customize.", user_config_path.display());
|
||||
println!("{}: Using {} configuration.\n Create file in '{}'to customize.\n",
|
||||
style("note").green().bold(),
|
||||
style("default").bold(),
|
||||
style(user_config_path.display()).underlined().white().bold());
|
||||
}
|
||||
|
||||
Ok(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue