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

Re: Advanced aliases with arguments (?)

From
Mike Hommey <mh@glandium.org>
Date
Nov 4, 2007, 00:45 UTC
Message-ID
<20071104004551.GA30927@glandium.org>
In-Reply-To
<20071104004020.GA30487@glandium.org>
On Sun, Nov 04, 2007 at 01:40:20AM +0100, Mike Hommey wrote:
Show 15 quoted lines
> Hi,
> 
> I read on http://git.or.cz/gitwiki/Aliases that
> 
>         Starting with version 1.5.3, git supports appending the
>         arguments to commands prefixed with "!", too. If you need to
>         perform a reordering, or to use an argument twice, you can use
>         this trick:
> 
>         [alias]
>                 example = !sh -c "ls $1 $0"
> 
> 
> AFAICT, it doesn't work with the 1.5.3.5 I use. Is it false advertising
> or was there some regression ?

Aaaah it does work, but you need to use single quotes, not double quotes.

Mike
Previous: Mike Hommey
Message 2 of 2 in “Advanced aliases with arguments (?)”
  1. Mike HommeyNov 4, 2007
  2. Mike HommeyNov 4, 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.