Re: [PATCH v2] An alias that starts with "!!" runs in the current directory.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 5, 2010, 23:43 UTC
- Message-ID
- <7vpr19j4ng.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1273098179.723.10.camel@dreddbeard>
Will Palmer <wmpalmer@gmail.com> writes:
> Is there any precedent for the "!!" syntax? Something like ".!", "./!", > or "!(.)" would make the intention more clear, I'd think, as well as > leaving room for other extensions to be added later...
While I don't think !! is particularly good (or bad), possible future extension is always a good reason to think about the notation carefully.
It probably is a good idea to switch aliases to start at the $cwd in 1.8.0 (or perhaps one major release after it), and using a notation that is more descriptive, something like "!(cwd)" vs "!(root)", may give us a better transtion strategy than casting cryptic "!!" in the stone.
What other variants might we want to be able to specify while defining and using aliases? If cwd vs root is the only distinction, then !(cwd) would be a bit overkill, but if we used !! for this new feature, I suspect that it would make it much harder to switch the default in the future.
Comments?