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

gitfast: improve command aliases (#9385)

So that compdefs with dashes work as well as underscores:

  compdef _git gc=git_commit

Or:

  compdef _git gc=git-commit

The official Zsh Git completion uses dashes, and this way people don't
have to change their existing definitions.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras 2020-10-24 09:33:43 -05:00 committed by GitHub
parent a32564e0ae
commit 66f9fdabc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -275,6 +275,8 @@ _git ()
emulate ksh -c __${service}_main
elif (( $+functions[_${service}] )); then
emulate ksh -c _${service}
elif (( $+functions[_${service//-/_}] )); then
emulate ksh -c _${service//-/_}
fi
let _ret && _default && _ret=0