From: Junio C Hamano Date: Mon, 07 Feb 2022 07:03:33 GMT Subject: Re: [PATCH v2 2/2] completion: add a GIT_COMPLETION_SHOW_ALL_COMMANDS Message-ID: In-Reply-To: <20220206224740.GD1936@szeder.dev> SZEDER Gábor writes: > Superficial testing shows that it appears to work in common cases, but > we'll have to think it through when and how to clear these variables. > E.g.: > > $ git d > describe diff difftool > # Oh, but I wanted to disable the pager > $ git --no-p > # this completes the option uniquely > $ git --no-pager d > daemon diff diff-index diff-tree > describe diff-files difftool > > I think here it should list only porcelains, but because both those > last_cur variables still contain 'd', it lists plumbing as well. Yup, it always is tricky to "invalidate" a cached value.