This is a simpler alternative to #8 . Instead of using enums like @TheBlueMatt suggested, I simply handle all arguments as strings and remove the bool type, the type that allowed multiple values and the category arguments. I only need those (I don't really need the bool type) when I try to adapt this to support multiple chains at once anyway, and that can always happen in my own branch.
Although the changes in main are +26-22, note that 2 lines are for the mod argman, 1 is a new sanity check and 5 of them are for producing the --help documentation.
We can simplify argman.rs further by not allowing arguments without a default, but then we need a default for -datadir and -rpcauth and I don't think the later should have one. That won't simplify main.rs any further though.
This is a simpler alternative to #8 . Instead of using enums like @TheBlueMatt suggested, I simply handle all arguments as strings and remove the bool type, the type that allowed multiple values and the category arguments. I only need those (I don't really need the bool type) when I try to adapt this to support multiple chains at once anyway, and that can always happen in my own branch.
Although the changes in main are +26-22, note that 2 lines are for the mod argman, 1 is a new sanity check and 5 of them are for producing the --help documentation.
We can simplify argman.rs further by not allowing arguments without a default, but then we need a default for -datadir and -rpcauth and I don't think the later should have one. That won't simplify main.rs any further though.