# Advanced aliases with arguments (?)

2 messages from 2007-11-04 to 2007-11-04. Participants: Mike Hommey.
Thread: https://gitlist.dev/t/10627

## Mike Hommey, 2007-11-04 00:40

Subject: Advanced aliases with arguments (?)
Message-ID: <20071104004020.GA30487@glandium.org>
URL: https://gitlist.dev/e/20071104004020.GA30487%40glandium.org

```
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 ?

Mike

```

## Mike Hommey, 2007-11-04 00:45

Subject: Re: Advanced aliases with arguments (?)
Message-ID: <20071104004551.GA30927@glandium.org>
URL: https://gitlist.dev/e/20071104004551.GA30927%40glandium.org
In-Reply-To: <20071104004020.GA30487@glandium.org>

```
On Sun, Nov 04, 2007 at 01:40:20AM +0100, Mike Hommey wrote:
> 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

```
