Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH v2] completion: Handle '!f() { ... }; f' aliases

From: Steffen Prohaska <hidden>
Date: 2016-06-15 23:01:36

Possibly related (same subject, not in this thread)

On Jun 10, 2014, at 7:27 AM, Junio C Hamano [off-list ref] wrote:
Steffen Prohaska [off-list ref] 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.

quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help