mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-13 14:33:47 +00:00
stash: print --help text if no subcommand is provided
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a69646361b7ade52ee73a6aa11be859132a94
This commit is contained in:
parent
d9029ef8b7
commit
fcaf5fb14f
1 changed files with 7 additions and 2 deletions
|
|
@ -5,6 +5,8 @@ use std::{
|
|||
process,
|
||||
};
|
||||
|
||||
use clap::CommandFactory;
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
mod commands;
|
||||
|
|
@ -234,8 +236,11 @@ fn main() {
|
|||
Some(Command::Watch) => {
|
||||
run_daemon(&db, cli.max_dedupe_search, cli.max_items);
|
||||
}
|
||||
_ => {
|
||||
log::warn!("No subcommand provided");
|
||||
None => {
|
||||
if let Err(e) = Cli::command().print_help() {
|
||||
eprintln!("Failed to print help: {e}");
|
||||
}
|
||||
println!();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue