I am using git on the command line. I often develop new features in Git branches named after the Jira problems ( Wikipedia: JIRA ) related to them, for example. branch "new-123" for the ticket "Gin" "NEW-123".
I have a local Git hook-commit-msg hook that will create a commit message by selecting an item from a Jira ticket from Jira. For instance. "Finished # NEW-123: Cool new feature."
However, I prefer to commit directly from the command line:
git commit -m "Finished #NEW-123: Cool new feature" .
I would like to create the quoted commit message just by pressing [TAB].
I know the bash completion mechanism ( Bash: an introduction to programmable completion ). But how to use it together with existing command completion (git has excellent completion in bash)? Can I "bind" the completion?
Or do I need to reprogram the Git completion functions (perhaps by adding a binding to my custom function)?
source share