From: Jeff King Date: Thu, 06 Oct 2016 19:07:20 GMT Subject: Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd Message-ID: <20161006190720.4ecf3ptl6msztoya@sigill.intra.peff.net> In-Reply-To: <20161006190014.owmqr2eqyk5h5cau@sigill.intra.peff.net> On Thu, Oct 06, 2016 at 03:00:14PM -0400, Jeff King wrote: > PS I think your "!!" syntax conflicts with something like: > > git -c alias.has-changes='!! git diff --quiet' has-changes > > I don't know if that is worth worrying about or not. I also notice > that using "!!git diff" with no space seems broken, as it seems to > skip using the shell. I wonder if that is a bug in run-command. Nevermind this last bit. It is the shell that is complaining (rightfully) about "!git"; the error message is just confusing because it mentions $0, which contains the whole script: $ git -c alias.has-changes='!!git diff --quiet' has-changes !git diff --quiet: 1: !git diff --quiet: !git: not found The "!! git diff" syntax sill has the conflict I mentioned (though note I screwed up the quotes in what I wrote above). -Peff