Re: [PATCH 0/8] builtin/config: introduce subcommands
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 7, 2024, 00:13 UTC
- Message-ID
- <ZekGjDD6TjF0FYXy@nand.local>
- In-Reply-To
- <xmqq1q8mq5oo.fsf@gitster.g>
On Wed, Mar 06, 2024 at 03:52:23PM -0800, Junio C Hamano wrote:
Show 12 quoted lines
> Taylor Blau <me@ttaylorr.com> writes: > > > I don't have strong feelings about this, but I wonder if `--urlmatch` > > (or `--url-match`) might be an argument to the "get" mode of this > > sub-command instead. Something like `git config get --urlmatch` feels > > much more natural to me than `git config get-urlmatch`. > > I like that, too. > > "--get-regexp" may also be a good candidate to be folded into the > base verb "get", with "--regexp" option to tweak what kind of key is > used.
Yes, definitely.
> Could "--get-color" and "--get-colorbool" become verb "get" with > "--type=color"? The other parameters they get are somewhat > different from "get", so that may not work very well, I guess.
I'm somewhat embarrassed to not have a better suggestion, since I vaguely remember working on the `--type` option as one of my first contributions to the project.
Indeed: fb0dc3bac13 (builtin/config.c: support `--type=<type>` as preferred alias for `--<type>`, 2018-04-18). ;-).
Thanks, Taylor