From: Patrick Steinhardt Date: Fri, 23 Oct 2026 06:21:10 GMT Subject: Re: [PATCH 5/5] completion: drop "stash save" completion altogether Message-ID: In-Reply-To: On Thu, Oct 22, 2026 at 09:14:52AM -0400, D. Ben Knoble wrote: > On Tue, Oct 20, 2026 at 2:05 AM Patrick Steinhardt wrote: > > > > On Mon, Oct 19, 2026 at 04:01:15PM -0400, Ben Knoble wrote: > > > > > > > Le 16 oct. 2026 à 04:01, Patrick Steinhardt a écrit : > > > > > > > > On Mon, Oct 12, 2026 at 01:48:31PM -0400, D. Ben Knoble wrote: > > > >> It's been deprecated since fd2ebf14db (stash: mark "git stash save" > > > >> deprecated in the man page, 2017-10-22) and the previous commit removed > > > >> further documentation suggesting to use it. > > > >> > > > >> Since we recommend push instead, stop completing for "save" and remove a > > > >> special case in completion code. > > > > > > > > This is the only part I'm a bit torn on. I think it's reasonable to not > > > > autocomplete the "save" command, but if the user manually types it, > > > > should we really stop autocompleting its options altogether? > > > > > > > > Maybe the answer is "yes". After all, as you mentioned in the preceding > > > > commit, the command is deprecated since 2017 already! And after almost > > > > 10 years I think it's fair to start giving users more nudges into the > > > > direction of using "push" instead. > > > > > > > > One note though: the command _will_ be completed in the case where you > > > > have GIT_COMPLETION_SHOW_ALL set > > > > > > I should definitely mention SHOW_ALL; I’m not actually sure > > > what happens for « git stash save -- » with this patch, > > > so I’ll double-check. I actually wonder if it will complete options. > > > > > > Would that satisfy you if so ? > > > > Probably depends on the outcome of your tests, but ultimately I think > > I'd be fine with either of the options. But if we stop autocompleting we > > should definitely mention SHOW_ALL. > > Here's what my testing showed (all Zsh): > > - with SHOW_ALL, "git stash " lists "save" as an option; "git > stash save --" completes options > - without SHOW_ALL, "git stash " does not list "save"; "git stash > sa" does not complete "save"; "git stash save --" completes > options > > I'll update the commit locally to reflect this. Thoughts? We could of course add logic to explicitly stop completing options for the deprecated subcommand. But I doubt it's worth it? So I think this is good enough. Patrick