Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Multi-word aliases?

On 2014-11-04 13:53:37 +0100, Dominik Vogt wrote:
> On Tue, 04 Nov 2014 13:32:08 +0100
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> > I think in the long run you'll run into more trouble if you expect the
> > behaviour of commands that do something to be different than it is,
> > than if you type a command that doesn't exist which then makes you
> > realize you have to type out the full command. But in this particular
> > case the resulting difference isn't very life-threatening :).

I agree.

> Actually, most of the time when I miss something like that in zsh,
> it turns out that once the shell history contains only invocations
> of "git rebase" including "--keep-empty" the problem goes away
> almost automatically.  That is because I'm way too lazy to type
> long commands and instead use history search all the time, usually
> after the first or the second letter.  :-)

Then I suggest:

alias gr='git rebase --keep-empty'

and if this isn't clear for other people, make zsh output the alias
expansion before running the command.

Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Messages sorted by: Reverse Date, Date, Thread, Author