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

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

From
Taylor Blau <me@ttaylorr.com>
Date
Nov 9, 2020, 22:01 UTC
Message-ID
<X6m8R9erSxGlPXq2@nand.local>
In-Reply-To
<20201109215248.461167-1-felipe.contreras@gmail.com>
Hi Felipe,
On Mon, Nov 09, 2020 at 03:52:48PM -0600, Felipe Contreras wrote:
> It is possible to have a recursive aliases like:

I am not an expert or user of the Bash completion scripts in contrib, so I'll refrain from reviewing that portion of the patch.

I would, however, recommend that you avoid the word 'recursive' here. Git rightly detects and rejects recursive and looping aliases. In fact, the example that you give below:

>   l = log --oneline
>   lg = l --graph

Is not even recursive. I would instead recommend calling 'lg' a "nested" alias.

You could argue about whether it is "l", "lg", or both that are nested, but I think renaming the patch to "completion: bash: support nested aliases" and then a s/recursive/nested throughout the patch message would be sufficient.

> So the completion should detect such aliases as well.

Thanks, Taylor

Previous: Felipe ContrerasNext: Junio C Hamano
Message 2 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.