From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3210 invoked by alias); 4 Nov 2014 11:43:16 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19339 Received: (qmail 23967 invoked from network); 4 Nov 2014 11:43:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 Date: Tue, 4 Nov 2014 12:33:05 +0100 From: Dominik Vogt To: Zsh Users Subject: Re: Multi-word aliases? Message-ID: <20141104113305.GA13232@linux.vnet.ibm.com> Reply-To: vogt@linux.vnet.ibm.com Mail-Followup-To: Zsh Users References: <20141104090838.GA27526@linux.vnet.ibm.com> <20141104095650.3f198112@pwslap01u.europe.root.pri> <20141104104339.GA6255@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14110411-0017-0000-0000-000001B4DDE3 On Tue, Nov 04, 2014 at 11:59:09AM +0100, Mikael Magnusson wrote: > On Tue, Nov 4, 2014 at 11:43 AM, Dominik Vogt wrote: > > According to the man page, you can only define new aliases, not > > overwrite subcommands. > > > > $ man git-config > > ... > > To avoid confusion and troubles with script usage, aliases that > > hide existing git commands are ignored. > > Is there a strong reason you don't want to write "git rk" or whatever > at the command line? Yes: I don't want to create my own syntax that nobody understands but me and then be unable to work on a plain system without silly "custom" configuration. I tried it but found the mechanism awkward and confusing - and the colleagues did not understand what I was doing. > I'm quite lazy with typing so I have a set of > aliases like git rc, git rs for --continue, --skip, and git amend for > git commit --amend. I have some handy shell aliases for some lengthy commands that nobody else would ever use, but I wouldn't bother bother to do that in an application specific way. I don't really mind the typing (because it's usually just "git reb". What's really annoying is that rebase silently dumps empty commits without that option (I use empty commits with comments like "-- ready-to-submit --" or "-- submitted --" in my work repo to sort patches). > As for the global command line regex replace, yes, you can do that if > you hook into the accept-line family of widgets but there's a huge > caveat; it will only do literal replacements (obviously), so if you > want to respect any form of quoting you'll have to reimplement the > full zsh parser in shell script Ouch! Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany