Closed johscheuer closed 2 years ago
I too prefer hyphens, though it's worth noting that I think underscores tend to be the predominant choice in our other binaries (e.g. fdbserver, fdbbackup). Probably either way we'll need to include both options for a while for any parameter we change, so maybe choosing to switch isn't too big a deal.
Oh right, I didn't mentioned the other binaries but in general I think it's worth unifying all flags everything else is confusing (at least for me). 👍 on keeping both variants for a while in the commands, we probably want to print out a warning if someone uses an "old" version. I'm not sure about the version/compatibility guarantees but I guess we want to keep both versions until we release a new major version (if we want to be compatible with semver).
@sfc-gh-mpilman Proposed changing the parser to treat hyphen and underscore as the same and the updating the documentation to use all hyphens.
Cool @jzhou77 I would take a look and fix that, sounds like a reasonable part to work on.
I think the easiest way for fixing this would be to change all hyphens to underscores before passing it to the argument parser and then change the help text to only use hyphens. The reason it would be easier to only use underscores internally is because we have some weird composed argument types (like --knob_
and --locality
) -- also not all arguments are documents (not sure whether this statement is also true for fdbcli
-- it certainly is for fdbserver
).
It would be great to do this for all command line tools (fdbserver
, fdbcli
, and fdbbackup
and its variants). Then it would be consistent which would be great
fdbcli
flags currently contain a mixture of_
and-
(probably for historic reasons). I would propose to unify the flags and only use either_
or-
personally I tend to hyphens like recommended in the POSXI standard (https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html). Currentfdbcli
help output:I think a consistent way will improve the user experience.