Loading zsh/git-supertree.completion.zsh +14 −9 Original line number Diff line number Diff line Loading @@ -44,14 +44,23 @@ _git-supertree() ;; (convert) declare -a refs=( $(git for-each-ref \ --format='%(refname:short)' \ refs/heads \ ) ) _arguments \ "--master[Override the value of the base HEAD symbolic ref]:ref:($(__git_supertree_list_branches))" \ "--master[Override the value of the base HEAD symbolic ref]:ref:(${refs[*]})" \ '::path:_directories' \ ;; (add) declare -a refs=( $(git for-each-ref \ --format='%(refname:short)' \ refs/heads \ refs/remotes \ ) ) _arguments \ "--from[Override the value of the base HEAD symbolic ref]:ref:($(__git_supertree_list_branches))" \ "--from[Use a branch other than the value of the base HEAD symbolic ref]:ref:(${refs[*]})" \ ':BRANCH:__git_supertree_branch_spec' \ ;; Loading @@ -65,15 +74,11 @@ _git-supertree() esac } __git_supertree_list_branches() { git branch -l | grep -v '*' } __git_supertree_branch_spec() { _sep_parts "( $(__git_supertree_list_branches) )" : '*' declare -a refs=( $(git for-each-ref --format='%(refname:short)' refs/heads) ) refs+=( $(git for-each-ref --format='%(refname:strip=3)' refs/remotes) ) _sep_parts "(${refs[*]})" : '*' } zstyle ':completion:*:*:git:*' user-commands supertree:'manage a collection of worktrees' Loading
zsh/git-supertree.completion.zsh +14 −9 Original line number Diff line number Diff line Loading @@ -44,14 +44,23 @@ _git-supertree() ;; (convert) declare -a refs=( $(git for-each-ref \ --format='%(refname:short)' \ refs/heads \ ) ) _arguments \ "--master[Override the value of the base HEAD symbolic ref]:ref:($(__git_supertree_list_branches))" \ "--master[Override the value of the base HEAD symbolic ref]:ref:(${refs[*]})" \ '::path:_directories' \ ;; (add) declare -a refs=( $(git for-each-ref \ --format='%(refname:short)' \ refs/heads \ refs/remotes \ ) ) _arguments \ "--from[Override the value of the base HEAD symbolic ref]:ref:($(__git_supertree_list_branches))" \ "--from[Use a branch other than the value of the base HEAD symbolic ref]:ref:(${refs[*]})" \ ':BRANCH:__git_supertree_branch_spec' \ ;; Loading @@ -65,15 +74,11 @@ _git-supertree() esac } __git_supertree_list_branches() { git branch -l | grep -v '*' } __git_supertree_branch_spec() { _sep_parts "( $(__git_supertree_list_branches) )" : '*' declare -a refs=( $(git for-each-ref --format='%(refname:short)' refs/heads) ) refs+=( $(git for-each-ref --format='%(refname:strip=3)' refs/remotes) ) _sep_parts "(${refs[*]})" : '*' } zstyle ':completion:*:*:git:*' user-commands supertree:'manage a collection of worktrees'