-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_commitish
More file actions
executable file
·42 lines (33 loc) · 1.11 KB
/
_commitish
File metadata and controls
executable file
·42 lines (33 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#compdef commitish
# ZSH completion for commitish
# Place this file in your fpath (e.g., /usr/share/zsh/site-functions/\_commitish)
# and make sure it's executable: chmod +x \_commitish
\_commitish() {
local -a opts args
opts=(
'-h[Show help message]'
'--help[Show help message]'
'-b[Include a commit body (multi-line description)]'
'--body[Include a commit body (multi-line description)]'
'--no-verify[Skip git hooks]'
'--ai[Use AI to suggest commit details]'
)
args=(
'feat:A new feature'
'fix:A bug fix'
'docs:Documentation only changes'
'style:Changes that do not affect the meaning of the code'
'refactor:A code change that neither fixes a bug nor adds a feature'
'perf:A code change that improves performance'
'test:Adding missing tests or correcting existing tests'
'build:Changes that affect the build system or external dependencies'
'ci:Changes to CI configuration files and scripts'
'chore:Other changes that'\''t modify src or test files'
'revert:Reverts a previous commit'
)
\_arguments -s "$opts[@]" && return
local -a commit_types
commit_types=(${args%%:\*})
\_describe 'commit type' commit_types
}
\_commitish "$@"