summaryrefslogtreecommitdiff
path: root/plugins/gitfast/_git
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2014-06-05 18:15:47 -0500
committerFelipe Contreras <felipe.contreras@gmail.com>2016-05-19 23:53:47 -0500
commit36e29fbc193c32d14f0d63fbf6ae233a924b1d67 (patch)
tree093e17fc41795cb672ae756d366e434d371f69d2 /plugins/gitfast/_git
parent079fef48dfc06b415423abb0a1e467f85e03b2c4 (diff)
downloadzsh-36e29fbc193c32d14f0d63fbf6ae233a924b1d67.tar.gz
zsh-36e29fbc193c32d14f0d63fbf6ae233a924b1d67.tar.bz2
zsh-36e29fbc193c32d14f0d63fbf6ae233a924b1d67.zip
completion: zsh: improve main function selection
Sometimes we want to use the function directly (e.g. _git_checkout), for example when zsh has the option 'complete_aliases', this way, we can do something like: compdef _git gco=git_checkout Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'plugins/gitfast/_git')
-rw-r--r--plugins/gitfast/_git4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git
index 7ed3e3c26..6d1b4ecc7 100644
--- a/plugins/gitfast/_git
+++ b/plugins/gitfast/_git
@@ -214,8 +214,10 @@ _git ()
if (( $+functions[__${service}_zsh_main] )); then
__${service}_zsh_main
- else
+ elif (( $+functions[__${service}_main] )); then
emulate ksh -c __${service}_main
+ elif (( $+functions[_${service}] )); then
+ emulate ksh -c _${service}
fi
let _ret && _default && _ret=0