argh icon indicating copy to clipboard operation
argh copied to clipboard

Rust derive-based argument parsing optimized for code size

Results 78 argh issues
Sort by recently updated
recently updated
newest added

It would be great to have a changelog in the repo and/or release notes on the GitHub releases page. It would help users know the context of a release and...

Typically `std::env::args::nth(0)` contains the binary execution name. How am I going to access it when I use `#[derive(FromArgs)]`? --- I would like to have something like this: ```rust #[derive(FromArgs)] struct...

I'm having a weird issue with the generated help message: the command is with it's absolute path when I run `./target/debug/mycmd --help` What am I doing wrong? ``` ./target/debug/mycmd --help...

bug
good first issue

This is the code I am using ([full link](https://git.cryptid.cc/lost/cmg/src/commit/cc271fd278895a904c4ba71debdc8e78f0a1fe25/src/cli.rs)): ```rust #[derive(FromArgs, PartialEq, Debug)] #[argh( description = "used to search for crackmes (WARNING: Only gets first page of results)", subcommand, name...

It's rather surprising that we can do this: ``` use argh::FromArgs; #[derive(FromArgs)] #[argh(description="")] struct Cmd { #[argh(subcommand)] _sub: SubCmd, } #[derive(FromArgs)] #[argh(subcommand, name = "sub sub", description="")] struct SubCmd {}...

```rust #[derive(FromArgs, Debug)] /// tool pub struct Config { #[argh(option)] /// run forever. Exit with Ctrl-C. pub r#loop: bool, } ``` ``` $ tool --loop Required options not provided: --r-loop...

```rust /// ... #[derive(argh::FromArgs)] struct Opts { #[argh(positional)] dbpath: PathBuf, #[argh(subcommand)] cmd: Cmd, } /// Outout entire content of the database to text file, stdout (suitable for migrations) #[derive(argh::FromArgs)] #[argh(subcommand,...

This causes the following positional argument to be omitted from the usage text, useful for writing commands for environments like cargo. Signed-off-by: Bruce Guenter Closes #73

I have been using argh to develop a new cargo command. Cargo passes the actual command being executed as the first command line argument. In order to capture (and ignore)...

structopt supports "flattening", which allows one struct to be embedded in another "transparently". This is useful as documented in structopt, but also useful when two commands have the same arguments...

enhancement
help wanted