From: Felipe Contreras <felipe.contreras@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Brandon Williams" <bwilliamseng@gmail.com>,
"Felipe Contreras" <felipe.contreras@gmail.com>,
"Ryan Zoeller" <rtzoeller@rtzoeller.com>,
"SZEDER Gábor" <szeder.dev@gmail.com>,
"Philippe Blain" <levraiphilippeblain@gmail.com>
Subject: Re: [PATCH] parse-options: don't complete option aliases by default
Date: Thu, 15 Jul 2021 12:16:18 -0500 [thread overview]
Message-ID: <60f06d62868db_4b6820816@natae.notmuch> (raw)
In-Reply-To: <8735sfzgkg.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> On Thu, Jul 15 2021, Philippe Blain via GitGitGadget wrote:
> I'm a bit biased here since I like --recursive better, but let's not
> drag that whole argument up again. I don't find the argument in
> bb62e0a99fc (clone: teach --recurse-submodules to optionally take a
> pathspec, 2017-03-17) convincing enough to have moved such a prominent
> use-case to a longer option name.
I agree.
> But, water under the bridge. Aside from that:
>
> For me a Google search for "git clone --recursive" is ~40k results, but
> "git clone --recurse-submodules". The former links to various
> discussions/docs/stackoverflow answers, often --recurse-submodules isn't
> mentioned at all or as an aside.
It would be nice if facts could be used as evidence of a UI mistake, but
alas in my experience that has never been the case.
> I think it's unfortunate that we:
>
> 1. Conflate whether something shows up in completion v.s. the
> help. Given its prominence and that "git clone -h" is ~50 lines why
> not note --recursive there.
Agreed.
> 2. Don't have the completion aware of these aliases, i.e. "git clone
> --rec<TAB>" before your chance offers a completion of both, that sucks,
> we should fully complete the non-alias instead.
Yes, that's what would happen with the patch.
> 3. Making it PARSE_OPT_HIDDEN "solves" #2 at the cost of hiding it in
> "git help -h", and now this won't work, but did before:
>
> git clone --recursi<TAB>
>
> I.e. even if we didn't want to do #2 *and* wanted to hide it in the
> usage output surely completing an unmbigous prefix is better, even
> if it's a hidden option?
This is something that could be done in zsh, but not in bash (at least
not easily).
> E.g. the user has used --recursive for years, but can't even find it in
> -h (I also think it's a mistake to have entirely removed it from the
> docs, even if one agrees with its "deprecation" I'd say we should keep
> some "used to be called --recursive" note there).
But that is not a problem of this patch. If users can't find --recursive
and complain about it, then that's actually a good thing, because now
the facts about --recursive vs. --recurse-submodules are not needed
anymore, and we could just fix the interface.
--
Felipe Contreras
next prev parent reply other threads:[~2021-07-15 17:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 12:58 [PATCH] parse-options: don't complete option aliases by default Philippe Blain via GitGitGadget
2021-07-15 16:16 ` Ævar Arnfjörð Bjarmason
2021-07-15 17:16 ` Felipe Contreras [this message]
2021-07-15 18:57 ` Junio C Hamano
2021-07-16 1:28 ` Philippe Blain
2021-07-16 1:31 ` Philippe Blain
2021-07-15 17:04 ` Felipe Contreras
2021-07-16 1:28 ` Philippe Blain
2021-07-16 1:55 ` [PATCH v2] " Philippe Blain via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60f06d62868db_4b6820816@natae.notmuch \
--to=felipe.contreras@gmail.com \
--cc=avarab@gmail.com \
--cc=bwilliamseng@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=levraiphilippeblain@gmail.com \
--cc=pclouds@gmail.com \
--cc=rtzoeller@rtzoeller.com \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.