From: Keith Smiley Date: Fri, 29 Dec 2017 23:19:47 GMT Subject: Re: [PATCH] Add shell completion for git remote rm Message-ID: <20171229231947.GA7698@bryant.local> In-Reply-To: <20171229224825.31062-1-szeder.dev@gmail.com> The goal of this fix isn't to complete rm itself (although that is a side effect), it's to complete the remote names after you type rm. Without this patch doing this: git remote rm Attempts to complete the options for `git remote` instead of the remote names. -- Keith Smiley On 12/29, SZEDER Gábor wrote: >> Keith Smiley wrote: >> > It looks like that was just about preferring remove in documentation >> > and the like, I think it would still make sense to have both for >> > completion since rm is still supported. >> >> I read it as a first step in a long process to eventually >> remove 'remote rm', but if that's never intended, then sure, >> restoring completion for it seems reasonable. >> >> It would be good to hear from those who know or recall the >> intention. >> >> I think we should only complete the preferred subcommand. >> That encourages use of 'remote remove' even if 'remote rm' >> will stay forever to avoid breaking existing scripts. > >Quoting from the commit message of e17dba8fe1 ("remote: prefer >subcommand name 'remove' to 'rm'", 2012-09-06): > > 'rm' is still supported and used in the test suite. It's just not > widely advertised. > >I think adding 'rm' to completion definitely counts as advertisement. >It doesn't have much practical use, after all: typing 'rm' with >completion is actually one more keystroke than without (rm vs. rm). > > >Gábor >