From: Steffen Prohaska Date: Thu, 12 Jun 2014 18:41:54 GMT Subject: Re: [PATCH v2] completion: Handle '!f() { ... }; f' aliases Message-ID: <62610ABB-4ED5-4CF1-B5B2-B89C9DD22FBD@zib.de> In-Reply-To: On Jun 10, 2014, at 7:27 AM, Junio C Hamano wrote: > Steffen Prohaska writes: > > I tend to prefer writing it like so instead: > > sh -c '...' - > > so that I won't clobber "f" (or any other name). I wonder if you > can help users of this other pattern as well. I'll send an updated patch that handles it. >> +test_expect_success 'completion uses completion for alias !f() { VAR=val git ... }' ' >> + test_config alias.co "!f() { VAR=val git checkout ... ; } f" && > > Is it only "f" that is completed, or can I spell it using another > arbitrary token, e.g. > > test_config alias.co "!co () { git checkout ... } co" Any token that starts with ! already worked before. The updated patch will also handle spaces before the parens. Steffen