This is not a very thorough example at all... I'm no pro at reading git source and I don't aim to be, but I would like to add autocompletion to some of my custom git commands. I dropped the code above into one of my scripts, changed COMMAND_NAME to the name of my git command, and... nothing. It's not clear what this example even should do or how to use it in the context of an existing custom command without investing hours learning the source of git.
So thanks. Thanks for popping up on google search with your lazy, high-level example. In other words, thanks for nothing.
This is not a very thorough example at all... I'm no pro at reading git source and I don't aim to be, but I would like to add autocompletion to some of my custom git commands. I dropped the code above into one of my scripts, changed COMMAND_NAME to the name of my git command, and... nothing. It's not clear what this example even should do or how to use it in the context of an existing custom command without investing hours learning the source of git.
So thanks. Thanks for popping up on google search with your lazy, high-level example. In other words, thanks for nothing.