How to make a default subcommand with clap and derive

Based on the official clap documentation. Modified by wrapping the Subcommand in Option, which makes it optional: use clap::{Parser, Subcommand}; #[derive(Parser)] #[command(author, version, about, long_about = None)] #[command(propagate_version = true)] struct Cli { #[command(subcommand)] command: Option<Commands>, } #[derive(Subcommand)] enum Commands { /// Adds files to myapp Add { name: Option<String> }, } fn main() { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)