T'interwebs, I'm confused. I'm writing a program to learn Rust, and the argument parser is behaving oddly. I give it one argument, and it acts as though I've given it another. Please can someone point out the bit where I've been stupid? gist.github.com/arafel/2d65e… cc @dsilverstone
1
I'm afraid I've lost the knack to read clap parser chains. I use the derive approach where you define your CLI as structs and enums
3
Though what it looks like is that your `update` argument has the value `search` which is kinda expected - it looks to me like you intended `update` and `search` to be subcommands of `groups` no?

Apr 23, 2022 Β· 6:31 PM UTC

1
Replying to @dsilverstone
I did, but I was expecting β€œupdate” to be Boolean, ie if the flag is present the value is true, no arguments or anything. search takes an argument (what to search for), update doesn’t. Did I get that wrong?
1