Re: [PATCH v2] An alias that starts with "!!" runs in the current directory.
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- May 6, 2010, 06:36 UTC
- Message-ID
- <4BE26387.1010904@viscovery.net>
- In-Reply-To
- <7vpr19j4ng.fsf@alter.siamese.dyndns.org>
Am 5/6/2010 1:43, schrieb Junio C Hamano:
> 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.
As always, we should start with the verbose tag, and if one turns out to be used frequently, use !! for it as a shortcut.
> 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.
The syntax should use a symbol that is less likely to appear at the start of a shell script. Perhaps "!@cwd".
-- Hannes