top | item 43405698

(no title)

mmcclimon | 11 months ago

> You can invoke git-who as git who by setting up an alias in your global Git config

This works even without the alias, by the way: by default `git whatever` will search your path for `git-whatever` and execute it.

discuss

order

weebst|11 months ago

Wow! I had no idea. Will need to update the README. Thanks for the tip!

jeff_carr|11 months ago

Yes, that is awesome. I wonder if "go" works like that also?

chatmasta|11 months ago

Has this behavior been the source of exploits in the past? Something about it feels dangerously presumptuous to me.

mdaniel|11 months ago

I am guessing it only resorts to that expansion if it dosesn't _already_ know about the command, because $(printf '#!/bin/sh\necho pwned\n' > /bin/git-status; chmod 755 /bin/git-status; git status) results in the thing happening that you'd expect, not a mysterious message

FWIW, both brew and kubectl also have adopted this behavior (of $(basename)-plugin style verb extensions) so I find it unlikely they'd all do it if it was a straight-up facepalm