From 7e614ffb9a89f15a6aa30c998a56bef86263af55 Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Fri, 17 Apr 2020 13:45:58 +0900 Subject: [PATCH] Don't use _git private functions Use own function instead --- src/_git-wtf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/_git-wtf b/src/_git-wtf index e909235..f3f15db 100644 --- a/src/_git-wtf +++ b/src/_git-wtf @@ -36,9 +36,16 @@ # ------- # # * Mario Fernandez (https://github.com/sirech) +# * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ +__git_wtf_branches() { + local -a branches + branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"}) + _describe 'branch' branches +} + _arguments -w -C -s \ '(--long --short)'{-l,--long}'[include author info and date for each commit]' \ '(--long --short)'{-s,--short}'[do not show commits]' \ @@ -47,7 +54,7 @@ _arguments -w -C -s \ '(--key)'{-k,--key}'[show key]' \ '(--relations)'{-r,--relations}'[show relation to features / integration branches]' \ '(--dump-config)--dump-config[print out current configuration and exit]' \ - '*: :__git_branch_names' + '*: :__git_wtf_branches' # Local Variables: # mode: Shell-Script