Re: [PATCH v2] An alias that starts with "!!" runs in the current directory.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On May  5, Will Palmer wrote:
> On Wed, 2010-05-05 at 17:31 -0400, Eli Barzilay wrote:
> > With "!"-prefixed shell aliases, the shell command not only gets
> > executed at the repository top level, but there is no way to know the
> > current directory of the original call.  This adds "!!"-prefixed aliases
> > as a similar variant for "!"-prefixed ones, but the commands are
> > executed in the original directory instead of the top level.
> > 
> > Signed-off-by: Eli Barzilay <eli@xxxxxxxxxxxx>
> 
> 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, and
> some explicit-opposite, like "/!", to complement it. (It's not like
> people are going around with binaries called "!", is it?)

[

The first time I saw the "!" syntax, it was slightly confusing to me
in that it's similar to various shells using "!" for history expansion
-- especially given that these things are popular with shell aliases
made it hard to remember.

An alternative character that wouldn't have confused me, and even
suggests shell commands is ";".  So my preference would be for shell
aliases to start with it and to be invoked in the original working
directory, perhaps deprecating the "!" syntax.

But I'm new enough to be safely ignored...  So this is all a
parenthetical comment...

]

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]