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

Re: [PATCH] Make '!' aliases more useful

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 2, 2007, 15:55 UTC
Message-ID
<Pine.LNX.4.64.0707021654450.4071@racer.site>
In-Reply-To
<20070702145549.GB4720@thunk.org>
Hi,
On Mon, 2 Jul 2007, Theodore Tso wrote:
Show 21 quoted lines
> On Sun, Jul 01, 2007 at 10:51:58PM +0100, Johannes Schindelin wrote:
> > 
> > When an alias starts with an exclamation mark, the rest is interpreted
> > as a shell command. However, all arguments passed to git used to be
> > ignored.
> > 
> > Now you can have an alias like
> > 
> > 	$ git config alias.e '!echo'
> > 
> > and
> > 
> > 	$ git e Hello World
> > 
> > does what you expect it to do.
> 
> But what if you don't want the argument passed at the end of the
> alias, but somewhere else?  I suspect the better answer would be to
> support $* and $1, $2, $3, et. al interpolation, no?  It was on my
> list of things to do when I had a spare moment, but I never got around
> to it.

There is a point where you do not want to complicate git, but rather write a script. This is such a point IMHO.

Ciao, Dscho

Previous: Theodore TsoNext: Theodore Tso
Message 3 of 11 in “Make '!' aliases more useful”
  1. Make '!' aliases more usefulJohannes Schindelin, Jul 1, 2007
  2. Theodore TsoJul 2, 2007
  3. Johannes SchindelinJul 2, 2007
  4. Theodore TsoJul 2, 2007
  5. Junio C HamanoJul 2, 2007
  6. Theodore TsoJul 3, 2007
  7. Johannes SchindelinJul 3, 2007
  8. Theodore TsoJul 3, 2007
  9. Johannes SixtJul 3, 2007
  10. Alex RiesenJul 3, 2007
  11. Johannes SchindelinJul 3, 2007

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.