These are chat archives for kbknapp/clap-rs
Hi, I am unable to get my args becuase I always get a `thread 'main' panicked at 'Argument short must be unique
-c is already in use', C:\Users\oalmo\.cargo\registry\src\github.com-1ecc6299db9ec823\clap-2.30.0\src\app\parser.rs:182:13
note: Run with
RUST_BACKTRACE=1 for a backtrace.` Error
short("chr")but the short is supposed to only be a single character
short("con")too and this was the source of the collision.
--chrinstead of just
-cwhich is what
targetdirectory is now under "lockdown"
cmd.exeas an Admin and just delete the target directory
C:\Users\oalmo\Projects\dndgen (master -> origin) λ del target/ Invalid switch - "".
`error: could not remove build directory
The process cannot access the file because it is being used by another process. (os error 32)`
cargo cleanagain it gave all the permission errors?
kevin@pop-os: ~ ➜ cd /tmp kevin@pop-os: /tmp ➜ cargo new tester --bin Created binary (application) `tester` project kevin@pop-os: /tmp ➜ cd tester kevin@pop-os: /tmp/tester ➜ cargo build Compiling tester v0.1.0 (file:///tmp/tester) Finished dev [unoptimized + debuginfo] target(s) in 0.55 secs kevin@pop-os: /tmp/tester ➜ ls -l total 4 -rw-rw-r-- 1 kevin kevin 47 Mar 4 13:31 Cargo.lock -rw-rw-r-- 1 kevin kevin 103 Mar 4 13:30 Cargo.toml drwxrwxr-x 1 kevin kevin 14 Mar 4 13:30 src drwxrwxr-x 1 kevin kevin 10 Mar 4 13:31 target kevin@pop-os: /tmp/tester ➜ cd target/debug kevin@pop-os: /tmp/tester/target/debug ➜ cargo clean kevin@pop-os: /tmp/tester/target/debug ➜ cd ../../ kevin@pop-os: /tmp/tester ➜ ls -l total 4 -rw-rw-r-- 1 kevin kevin 47 Mar 4 13:31 Cargo.lock -rw-rw-r-- 1 kevin kevin 103 Mar 4 13:30 Cargo.toml drwxrwxr-x 1 kevin kevin 14 Mar 4 13:30 src
-zfbis the same as
-z -f -b
-chrand disables the ability to stack shorts
-o valand mult-char shorts conflict with that too
--typein the same application?
InferArgumentssetting that would make
--chaautomatically work for for
--charisma, as well as any other unambiguous prefix.
-typewould be parsed as a single arg, but
-fbzwould still be
-f -b -z, or are you saying you want to stack single args with multi-char shorts (
-type -f -b -z)?
AppSettingsvariant, not a cargo dep feature
setting(AppSettings::DisableStackableShorts)or whatever we'd end up calling it
findbeing a huge application that uses these
-typestyle args still supports
-o val)style args, so there's precedent for at least supporting that still
find, but still
name: "10", strength: "4", dexterity: "3" , constitution: "1", intelligence: "17", wisdom "10", charisma: "16"
cargo clean && cargo build && cd /target/debug && test
cargo run -- --charisma=10
pub fn keysto the internal implementation of vec map, but I'm having trouble getting a signature so that line 121 on the parser doesn't care about the feature flag. I ended up doing this: https://github.com/kbknapp/clap-rs/pull/1198/files#diff-3519f1369b63436798d9d7841c7940e2R122 but that feels a little drastic. Let me know what you think, when you have a chance.