Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 1/2] _git: Break out a helper function.
- X-seq: zsh-workers 43442
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 1/2] _git: Break out a helper function.
- Date: Tue, 11 Sep 2018 13:24:20 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=0M6yLAxL7R2eEOKxQ q1rNQS9zo9nQpoPtz8lDPX8gKw=; b=jVK2jP673xzOp1VNhjebPrcGYKawh49OL T8zHoN/XdTz0xv+Hhe0og4y+qfeWNWCZcxhC78DGFwPPFfRILrerObckP/0+TSvA qyt+M4popvHGE776ZYyTRs8ue/OnSEqIYm2N6XjHABzAW2JYDTP/C/hhtXPEgSKs GXdoC9UDjViwiRMeIeIbvudI27RdVucKdApE9AsXzgXjPQaAowdVaf2UXrzJns0P Um6iUKOafAL+oB4Up1lBym3M7MXsoujd92AUd1f8tni8ktqlA5H6QpbZq4lleI4U ezX9iJ3Kku9Hjge08Q1nMbm2R/v/TKRke7JDeiQoLBQYG3FAWTMbw==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=0M6yLAxL7R2eEOKxQ q1rNQS9zo9nQpoPtz8lDPX8gKw=; b=PjRULx4AK4X1vSLWtUl7tM6skzJAKLsOh Z+9dYk01myXzCCAFRLltTp26qhJ2BmcmRjs65WfxgK0tHWCSbNbVBQ3YEnMNkuU/ hM5YcUUs+ETIN7sQmYZJBgYU1o44dfJraP7tZdB5p2qIOBmqkLYukoq/Aa7rTBi6 Gklk1beehumoKo7Lu4wgpxUUlzkIXZzsxMfk1aqzRehOhzFJfl+jg8wVW112hTJO y64XVQ1JSbaYk3oAbt/HvBjonBask9M83hoAq6qx5Yn2z7SF8M3UckstNW32IGs2 bU3XqT1EVu0P9Rm7mFfVqh24F0tY+EyRXAJ31FrmVWob83dbzbebA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
Completion/Unix/Command/_git | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 2cae4c82f..b2f93ff0f 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -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 $*
Messages sorted by:
Reverse Date,
Date,
Thread,
Author