From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 646371F66F for ; Tue, 10 Nov 2020 01:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730603AbgKJBTa (ORCPT ); Mon, 9 Nov 2020 20:19:30 -0500 Received: from cloud.peff.net ([104.130.231.41]:52346 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730565AbgKJBT0 (ORCPT ); Mon, 9 Nov 2020 20:19:26 -0500 Received: (qmail 5406 invoked by uid 109); 10 Nov 2020 01:19:26 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 10 Nov 2020 01:19:26 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 29781 invoked by uid 111); 10 Nov 2020 01:19:25 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Mon, 09 Nov 2020 20:19:25 -0500 Authentication-Results: peff.net; auth=none Date: Mon, 9 Nov 2020 20:19:24 -0500 From: Jeff King To: Felipe Contreras Cc: Git , Philippe Blain , Junio C Hamano , SZEDER =?utf-8?B?R8OhYm9y?= Subject: Re: [PATCH] completion: bash: support recursive aliases Message-ID: <20201110011924.GA1270103@coredump.intra.peff.net> References: <20201109215248.461167-1-felipe.contreras@gmail.com> <20201109221939.GA670413@coredump.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Nov 09, 2020 at 07:06:56PM -0600, Felipe Contreras wrote: > > We do have "git --git-completion-helper" these days. I wonder if > > something like "git --expand-alias-to-command" would be a useful > > addition, as it would let us directly ask which Git command would be > > executed (if any). And it would make both downsides go away. > > Yes, but I don't think we need to wait in order to have a solution for > both issues. I already sent an updated patch. Agreed. The cycle-detection in your v2 looks fine to me. > Additionally, it might not be what the user wants. For example the > user might decide to have different completion for each one of the > aliases (_git_l, _git_lg, etc.), and if so, we would want > __git_aliased_command to exit once we find the correct completion > function. Good point. -Peff