From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80C3CC433EF for ; Mon, 7 Feb 2022 07:06:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235633AbiBGHF6 (ORCPT ); Mon, 7 Feb 2022 02:05:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242505AbiBGHDh (ORCPT ); Mon, 7 Feb 2022 02:03:37 -0500 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 006BCC043186 for ; Sun, 6 Feb 2022 23:03:35 -0800 (PST) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 4BC7711458C; Mon, 7 Feb 2022 02:03:35 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=3peVimB+zomS pvmVJFAf+X4Agd7DoSkGlpn7/Pat+TM=; b=mQHJdfeFneMZRpfxAmKcWKMrgytV BBRWgiXFYiuzj4HQFGSrZ2KtBVMLLwXVPhbJAk/Yk+Pflk7zP48MG1u90BXNdKz+ rIGRKipG85vi4fOFl4q/Lj7tLC5Lu7GvB1b3X1SeE+8XT0A0BglMgytcRRvyFHC0 eqIm+020lbBhnx4= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 4249C11458B; Mon, 7 Feb 2022 02:03:35 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.185.212.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id A806D114589; Mon, 7 Feb 2022 02:03:34 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: SZEDER =?utf-8?Q?G=C3=A1bor?= Cc: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , git@vger.kernel.org, Hongyi Zhao , Philippe Blain , =?utf-8?Q?Jo=C3=A3o?= Victor Bonfim Subject: Re: [PATCH v2 2/2] completion: add a GIT_COMPLETION_SHOW_ALL_COMMANDS References: <20220206133026.GB1936@szeder.dev> <20220206224740.GD1936@szeder.dev> Date: Sun, 06 Feb 2022 23:03:33 -0800 In-Reply-To: <20220206224740.GD1936@szeder.dev> ("SZEDER =?utf-8?Q?G=C3=A1?= =?utf-8?Q?bor=22's?= message of "Sun, 6 Feb 2022 23:47:40 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 10E0551E-87E4-11EC-8182-5E84C8D8090B-77302942!pb-smtp1.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org SZEDER G=C3=A1bor 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.