Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd
- From
Jeff King <peff@peff.net>
- Date
- Oct 7, 2016, 14:20 UTC
- Message-ID
- <20161007142041.7xjqgujma5w6f77h@sigill.intra.peff.net>
- In-Reply-To
- <alpine.DEB.2.20.1610071519450.35196@virtualbox>
On Fri, Oct 07, 2016 at 04:11:34PM +0200, Johannes Schindelin wrote:
Show 17 quoted lines
> Possibly a better idea would be to use *another* special symbol, one that
> makes intuitive sense as a modifier, such as:
>
> [alias]
> # This works as before
> xyz = !pwd
> # As does this
> stat = -p status
> # This, however, is different:
> duy = (nocd)!pwd
>
> This is backwards compatible as "(" is not a part of any Git command, nor
> of a valid alias, nor is it commonly used as part of a git-*
> executable/script.
>
> It is also kind of a bit more intuitive, I'd wager, and it is also
> extensible to future options we may want to introduce.I like this much better (like you, I am concerned about things like "!(foo)" as conflicting with the shell). And I think your "(nocd)!pwd" example is quite readable.
-Peff