git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] completion: bash: support recursive aliases

From
Jeff King <peff@peff.net>
Date
Nov 10, 2020, 01:19 UTC
Message-ID
<20201110011924.GA1270103@coredump.intra.peff.net>
In-Reply-To
<CAMP44s2mZK2_aAepOQs-5fmrbYPJ74Jb4VaSgwMAEdzZXS+9ZA@mail.gmail.com>
On Mon, Nov 09, 2020 at 07:06:56PM -0600, Felipe Contreras wrote:
Show 7 quoted lines
> > We do have "git <cmd> --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.
Show 5 quoted lines
> 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
Previous: Felipe Contreras
Message 8 of 8 in “completion: bash: support recursive aliases”
  1. completion: bash: support recursive aliasesFelipe Contreras, Nov 9, 2020
  2. Taylor BlauNov 9, 2020
  3. Junio C HamanoNov 9, 2020
  4. Felipe ContrerasNov 10, 2020
  5. Felipe ContrerasNov 10, 2020
  6. Jeff KingNov 9, 2020
  7. Felipe ContrerasNov 10, 2020
  8. Jeff KingNov 10, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.