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

Re: recursive aliases

From
Andreas Ericsson <ae@op5.se>
Date
Sep 23, 2010, 11:34 UTC
Message-ID
<4C9B3B2A.2080604@op5.se>
In-Reply-To
<AANLkTi=VDmyhUDYKc38bOZWLncZ_twQGB2n5KgbgP_tf@mail.gmail.com>
On 09/23/2010 08:07 AM, Ramana Kumar wrote:
> Are recursive aliases in any way allowed?
They're not just not allowed; they're not even possible.
> What about aliases that don't refer to themselves, but refer to other aliases?
> 
Again, this isn't possible. How could you configure something like that?
> Obviously I can just call git from the shell with a ! alias, but
> wondering if there's any better way.

There isn't. The simple aliases are there to let you run certain commands with certain default parameters as a new command. Normal commands have no way of calling other commands (or themselves) recursively. That's what shell-scripts are for.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Previous: Ramana KumarNext: Andreas Schwab
Message 2 of 3 in “recursive aliases”
  1. Ramana KumarSep 23, 2010
  2. Andreas EricssonSep 23, 2010
  3. Andreas SchwabSep 23, 2010

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.