From: Derrick Stolee Date: Fri, 28 Jan 2022 19:37:22 GMT Subject: Re: [PATCH] scalar: accept -C and -c options before the subcommand Message-ID: <5283a1b2-a31f-1657-1a67-cab6d9fec0ac@gmail.com> In-Reply-To: On 1/28/2022 6:27 AM, Johannes Schindelin wrote: > Hi Stolee, > > On Thu, 27 Jan 2022, Derrick Stolee wrote: > >> The biggest benefits of using handle_options() is for other pre-command >> options such as --exec-path, which I use on a regular basis when testing >> new functionality. >> >> There are other options in handle_options() that might not be >> appropriate, or might be incorrect if we just make handle_options() >> non-static. For example, `scalar --list-cmds=parseopt` wouldn't show the >> scalar commands and would instead show the git commands. > > Right, and since `handle_options()` lives in the same file as `git`'s > `cmd_main()` function, we would not only have to disentangle options that > work only for `git` from those that would also work for `scalar`, but we > would have to extract the `handle_options()` function into a separate > file. I agree that these would be necessary steps. > But since I had a look at `handle_options()` anyway, I might just as well > summarize my insights about how applicable the supported options are for > `scalar` here: > > # Beneficial > > -c = > --config-env = > -C > > Since I added support for these (except for the long form > `--config-env` that I actually only learned while researching this > email), it is obvious that I'd like `scalar` to support them. > > # Won't hurt These "Won't hurt" items look to me as "they probably don't matter, but it would be nice if "scalar