mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
feat: ya pack displays help if no arguments are given (#1012)
This commit is contained in:
parent
faa1d9f37b
commit
386dd4c9c1
2 changed files with 2 additions and 1 deletions
|
|
@ -83,6 +83,7 @@ impl CommandPubStatic {
|
|||
}
|
||||
|
||||
#[derive(clap::Args)]
|
||||
#[command(arg_required_else_help = true)]
|
||||
pub(super) struct CommandPack {
|
||||
/// Add a package.
|
||||
#[arg(short = 'a', long)]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use clap::Parser;
|
|||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
if std::env::args_os().any(|s| s == "-V" || s == "--version") {
|
||||
if std::env::args_os().nth(1).is_some_and(|s| s == "-V" || s == "--version") {
|
||||
println!(
|
||||
"Ya {} ({} {})",
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue