Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 8, 2016, 08:36 UTC
- Message-ID
- <alpine.DEB.2.20.1610081034430.35196@virtualbox>
- In-Reply-To
- <20161007175052.sxyk7y2ytjh36phr@sigill.intra.peff.net>
Hi Peff & Hannes,
On Fri, 7 Oct 2016, Jeff King wrote:
Show 12 quoted lines
> On Fri, Oct 07, 2016 at 07:42:35PM +0200, Johannes Sixt wrote:
>
> > Maybe it's time to aim for
> >
> > git config alias.d2u.shell \
> > 'f() { git ls-files "$@" | xargs dos2unix; }; f'
> > git config alias.d2u.cdup false
> > git d2u *.c # yada!
>
> That would be nice. It would also allow "alias.foo_bar.shell"; right now
> "alias.foo_bar" is forbidden because of the config syntax, which does
> not allow underscores outside of the "subsection" name.So what about this?
[alias]
d2u = !dos2unix
[alias "d2u"]
shell = 'f() { git ls-files "$@" | xargs dos2unix; }; f'
exec = C:/cygwin64/bin/dos2unix.exeYou introduce all kinds of ambiguities here that did not exist before...
Ciao, Dscho