aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ts
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-06 18:37:26 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-06 18:38:04 +0200
commit6f2a1f83b525231cc28b98ce85d8b259cb25fd5f (patch)
tree3ad5b0d243aefdf0c1aeca64665eb8ff64198fea /pkgs/by-name/ts
parentfeat(pkgs/tskm/task): Use taskchampion instead of run_task (diff)
downloadnixos-config-6f2a1f83b525231cc28b98ce85d8b259cb25fd5f.zip
fix(pkgs/tskm/task): Make the verbosity selectable
Diffstat (limited to 'pkgs/by-name/ts')
-rw-r--r--pkgs/by-name/ts/tskm/src/cli.rs8
-rw-r--r--pkgs/by-name/ts/tskm/src/main.rs4
2 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/by-name/ts/tskm/src/cli.rs b/pkgs/by-name/ts/tskm/src/cli.rs
index bc79866a..bd389ca5 100644
--- a/pkgs/by-name/ts/tskm/src/cli.rs
+++ b/pkgs/by-name/ts/tskm/src/cli.rs
@@ -23,6 +23,14 @@ use crate::{
pub struct CliArgs {
#[command(subcommand)]
pub command: Command,
+
+ /// Increase message verbosity
+ #[arg(long="verbose", short = 'v', action = ArgAction::Count, default_value_t = 2)]
+ pub verbosity: u8,
+
+ /// Silence all output
+ #[arg(long, short = 'q')]
+ pub quiet: bool,
}
#[derive(Subcommand, Debug)]
diff --git a/pkgs/by-name/ts/tskm/src/main.rs b/pkgs/by-name/ts/tskm/src/main.rs
index 6e506895..5668bd91 100644
--- a/pkgs/by-name/ts/tskm/src/main.rs
+++ b/pkgs/by-name/ts/tskm/src/main.rs
@@ -49,10 +49,10 @@ fn main() -> Result<(), anyhow::Error> {
stderrlog::new()
.module(module_path!())
- .quiet(false)
+ .quiet(args.quiet)
.show_module_names(true)
.color(stderrlog::ColorChoice::Auto)
- .verbosity(5)
+ .verbosity(usize::from(args.verbosity))
.timestamp(stderrlog::Timestamp::Off)
.init()
.expect("Let's just hope that this does not panic");