lsd
lsd copied to clipboard
Use StructOpt (instead of clap) to reduce boilerplate
Problem
I can't help but notice the code used to parse CLI argument being overly repetitive:
- There are two files (
app.rs
andflags.rs
) just to parse CLI arguments, which repeat the same names multiple times. - In
app.rs
,.multiple(true).number_of_values(1)
is repeated multiple times. - In
flags.ts
, value conversions happen in multiple places.
Request
Instead of using Clap directly, I propose we should switch to StructOpt to reduce boilerplate. StructOpt is a wrapper macro around Clap so I am confident that there would be no breaking change.