summaryrefslogtreecommitdiff
path: root/plugins/gitfast/_git
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-10-24 09:33:43 -0500
committerGitHub <noreply@github.com>2020-10-24 16:33:43 +0200
commit66f9fdabc1d08374c3eef212928f81ff32e2241e (patch)
tree46b940c92b9bcc6939411e8ecd10471079c1484a /plugins/gitfast/_git
parenta32564e0ae87686702570f3f942977bc9280f178 (diff)
downloadzsh-66f9fdabc1d08374c3eef212928f81ff32e2241e.tar.gz
zsh-66f9fdabc1d08374c3eef212928f81ff32e2241e.tar.bz2
zsh-66f9fdabc1d08374c3eef212928f81ff32e2241e.zip
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>
Diffstat (limited to 'plugins/gitfast/_git')
-rw-r--r--plugins/gitfast/_git2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git
index 46d10d6f9..6ca63ed87 100644
--- a/plugins/gitfast/_git
+++ b/plugins/gitfast/_git
@@ -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