1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-23 14:20:08 +00:00

feat(git-commit): Use $0

This commit is contained in:
mattmc3 2024-08-20 08:41:46 -04:00
parent 440b66da14
commit d2f071f8dd
No known key found for this signature in database
GPG key ID: 652E0427A1278D6F

View file

@ -1,5 +1,7 @@
# Add git-commit commands directory to path
path=("$ZSH/plugins/git-commit/git-commands" $path)
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
path=("${0:a:h}/git-commands" $path)
# Append completions for custom git commands
() {
@ -29,7 +31,7 @@ path=("$ZSH/plugins/git-commit/git-commands" $path)
# Clean up aliases from the prior implementation of git-commit. Can be safely removed
# once everyone's .gitconfig has been restored.
() {
git config --global --get oh-my-zsh.git-commit-alias &> /dev/null || return
git config --global --get oh-my-zsh.git-commit-alias &> /dev/null || return 0
local -a old_git_aliases=(
'build' 'chore' 'ci'
'docs' 'feat' 'fix'