Created
July 12, 2017 09:28
-
-
Save johan/c107a16dc9517c04bd9717c9fd59d6db to your computer and use it in GitHub Desktop.
Angular style commit message <type> tagging completion (https://gist.github.com/stephenparish/9941e89d80e2bc58a153) added atop https://github.com/robbyrussell/oh-my-zsh/blob/d848c94804918138375041a9f800f401bec12068/plugins/gitfast/git-completion.bash#L1101-L1144
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _git_commit () | |
| { | |
| case "$prev" in | |
| (-c | -C) __gitcomp_nl "$(__git_refs)" "" "${cur}" | |
| return ;; | |
| (-m) __gitcomp "feat: fix: docs: style: refactor: test: chore: | |
| " "" "${cur}" | |
| return | |
| ;; | |
| esac | |
| case "$cur" in | |
| (--message=*) __gitcomp "feat: fix: docs: style: refactor: test: chore: | |
| " "" "${cur##--message=}" | |
| return | |
| ;; | |
| --cleanup=*) | |
| __gitcomp "default scissors strip verbatim whitespace | |
| " "" "${cur##--cleanup=}" | |
| return | |
| ;; | |
| --reuse-message=*|--reedit-message=*|\ | |
| --fixup=*|--squash=*) | |
| __gitcomp_nl "$(__git_refs)" "" "${cur#*=}" | |
| return | |
| ;; | |
| --untracked-files=*) | |
| __gitcomp "all no normal" "" "${cur##--untracked-files=}" | |
| return | |
| ;; | |
| --*) | |
| __gitcomp " | |
| --all --author= --signoff --verify --no-verify | |
| --edit --no-edit | |
| --amend --include --only --interactive | |
| --dry-run --reuse-message= --reedit-message= | |
| --reset-author --file= --message= --template= | |
| --cleanup= --untracked-files --untracked-files= | |
| --verbose --quiet --fixup= --squash= | |
| " | |
| return | |
| esac | |
| if git rev-parse --verify --quiet HEAD >/dev/null; then | |
| __git_complete_index_file "--committable" | |
| else | |
| # This is the first commit | |
| __git_complete_index_file "--cached" | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment