From 66f9fdabc1d08374c3eef212928f81ff32e2241e Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sat, 24 Oct 2020 09:33:43 -0500 Subject: [PATCH] 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 --- plugins/gitfast/_git | 2 ++ 1 file changed, 2 insertions(+) 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