Re: Weird behavior of shell variables in git aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22 March 2011 12:28, Jeff King <peff@xxxxxxxx> wrote:
>  $ grep -B1 silly .git/config
>  [alias]
>          silly = "!foo() { echo hello $1; echo $# args, bye!\n}\nfoo"
>
> which unsurprisingly looks like exactly the same solution one would use
> in the shell to avoid the fact that shell aliases suck for handling
> positional parameters.

Atually, I think that's probably the most elegant way of dealing with
the issue... An example like this would be very useful in the alias
documentation along with an explanation on how positional parameters
are handled...

-- 
/Lasse
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]