mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
43442: _git: Break out a helper function.
This commit is contained in:
parent
07ad7fd970
commit
7ae2be3a2f
2 changed files with 11 additions and 2 deletions
|
|
@ -2108,8 +2108,7 @@ _git-worktree() {
|
|||
;;
|
||||
esac
|
||||
if [[ $state = worktrees ]]; then
|
||||
_wanted directories expl 'working tree' compadd -S ' ' -f -M 'r:|/=* r:|=*' \
|
||||
${${(M)${(f)"$(_call_program directories git worktree list --porcelain)"}:#worktree*}#* } && ret=0
|
||||
__git_worktrees && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
@ -7561,6 +7560,11 @@ __git_browsers () {
|
|||
'builtin-browsers:builtin browser:compadd -a - builtinbrowsers'
|
||||
}
|
||||
|
||||
__git_worktrees () {
|
||||
_wanted directories expl 'working tree' compadd -S ' ' -f -M 'r:|/=* r:|=*' \
|
||||
${${(M)${(f)"$(_call_program directories git worktree list --porcelain)"}:#worktree*}#* }
|
||||
}
|
||||
|
||||
(( $+functions[__git_difftools] )) ||
|
||||
__git_difftools () {
|
||||
__git_diff-or-merge-tools diff $*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue