Open edrogers opened 2 years ago
Well spotted! 😄
I would like to point out, however, that one might argue for doing this the other way round. Since -j
currently means --emoji
, and --json
does in reality not have a short option, this could be a non-breaking change if the new -J
option were to mean --json
.
Personally I actually prefer your breaking change since JSON is a lot more common for me than console markup with emoji codes... But I would like to mention this alternative for the sake of completeness.
I agree, using -J
for JSON would avoid the breaking change. But I also would prefer JSON to be lowercased as it is a much more common use-case
The
-j
option name is listed for both the "Display as JSON" and "Enable emoji code" options in the code and documentation (including the splash screen image in the README). Click's option decorator silently allows one to overwrite the other. As a result, the JSON display option currently has no single-letter option name. To use it, one has to call--json
.Since the JSON option is older than the emoji option, I propose capitalizing the single-letter emoji option to
-J
. This would be a breaking change. I'll submit a PR for you to consider if this seems like a good approach.