Re: [PATCH v2] completion: Handle '!f() { ... }; f' aliases
On Jun 10, 2014, at 7:27 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Steffen Prohaska <prohaska@zib.de> 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.
Show 7 quoted lines
>> +test_expect_success 'completion uses <cmd> completion for alias !f() { VAR=val git <cmd> ... }' '
>> + 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