Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
git worktree add /foo <TAB>
- X-seq: zsh-workers 41517
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: git worktree add /foo <TAB>
- Date: Wed, 9 Aug 2017 19:31:13 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=aZfvC5QwKvicX1Xk0U 2K2fhr7dGYaM3QUReH8CBi1Dg=; b=UedNbnJ3bl7bqmiLiFGJg/zh8CQ8YSC3Oz YfAqfl/TbGvCP6i+T56hOJX46lmI7TNHcEydXpYPkKvgkxBM1yiHx9rYt1SUbBqr xH2iw+q5sscZYVE5hCm7yYj8bCaEcPunizR5+fkyovM2WQ/7yx6dZV42LC4WZcyh q+L8fCtu+wVsQ9EAbq5v4fYXWP8oq3+v/qZS2OE2h2Cc2T9QVHliFthdafVX4EDP Mo0dKrxfgWpzCvQ0/y5cSvcBtjRyJtN853m6lbzgdvPdTIpNWEKYCVemNlSI76Se bKD6wPma36OBW1aFm92s/10sF8SxTYvxnfqnt9tBdRYly8NZvvEA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=aZfvC5QwKvicX1Xk0U 2K2fhr7dGYaM3QUReH8CBi1Dg=; b=qH9oGgz4aPzlxGOYsqkK97Jjxd06NF5hHA 4ySehSGLyIpHLsl14FdTHYtYO8WrJyBAn0Hf3wfL2N9dJazbGS3rSskR7LMFkmXQ r4gvOKdeZE0tNEHsiOoh4XcIEXI0SuTskWt8MS6khflv3VHM3Zbp7s321yWYJ4WN nTe2XeikmfuIQOZTVCFvXF6SQY9id1hGF6QP0u3oW/rKBdNm76qiAYtmKrHF+Llf /XUD0EEKWtz1IIaYvDARGiRNlzWXs8zxWc5UX3JCBvm3IdmR6NfFG81nnrmGf8EH ShdMrTtuyyvxe/QGqUC/vN+5sak9Dkc8N49tUuLiZU5Uqqy2A0wg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
The second argument to 'git worktree add' can be any committish. That
committish becomes HEAD of the new worktree, and if it's a branch name,
then that branch becomes the current branch of the new worktree, else
the new worktree starts as a detached HEAD.
How should that be completed?
Currently it's completed as follows:
+++ b/Completion/Unix/Command/_git
@@ -2026,11 +2026,7 @@ _git-worktree() {
curcontext=${curcontext%:*}-$line[1]:
case $line[1] in
(add)
if (( $words[(I)--detach] )); then
args=( ':commit:__git_commits' )
else
args=( ':branch:__git_branch_names' )
fi
… and while simply using __git_commits unconditionally wouldn't be
wrong, I think this case might prefer a variant of __git_commits that
offers branch names in preference to the N other things __git_commits
offers. Do we have such a helper?
(Or should I just add another tag-order style to my config...?)
I see __git_recent_branches but it's not precisely what I have in mind.
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author