From: "Sardorbek Imomaliev via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Sardorbek Imomaliev <sardorbek.imomaliev@gmail.com>,
Sardorbek Imomaliev <sardorbek.imomaliev@gmail.com>
Subject: [PATCH] Fix: fix comment for __git_complete_worktree_paths
Date: Thu, 29 Apr 2021 08:43:53 +0000 [thread overview]
Message-ID: <pull.943.git.1619685833872.gitgitgadget@gmail.com> (raw)
From: Sardorbek Imomaliev <sardorbek.imomaliev@gmail.com>
Completion helper function fails for zsh because of wrongly put comment
Signed-off-by: Sardorbek Imomaliev <sardorbek.imomaliev@gmail.com>
---
Fix: wrongly put comment for __git_complete_worktree_paths completion
helper function
git completion script fails for zsh
$ git worktree remove [TAB]
$ git worktree remove __git_complete_worktree_paths:7: command not found: #
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-943%2Fimomaliev%2Ffix%2Fgit-completion-worktree-subcommands-comment-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-943/imomaliev/fix/git-completion-worktree-subcommands-comment-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/943
contrib/completion/git-completion.bash | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index dfa735ea6299..b2e158edaf6b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3268,9 +3268,9 @@ _git_whatchanged ()
__git_complete_worktree_paths ()
{
local IFS=$'\n'
+ # Skip the first entry: it's the path of the main worktree,
+ # which can't be moved, removed, locked, etc.
__gitcomp_nl "$(git worktree list --porcelain |
- # Skip the first entry: it's the path of the main worktree,
- # which can't be moved, removed, locked, etc.
sed -n -e '2,$ s/^worktree //p')"
}
base-commit: 311531c9de557d25ac087c1637818bd2aad6eb3a
--
gitgitgadget
next reply other threads:[~2021-04-29 8:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 8:43 Sardorbek Imomaliev via GitGitGadget [this message]
2021-04-30 0:42 ` [PATCH] Fix: fix comment for __git_complete_worktree_paths Junio C Hamano
2021-05-03 16:29 ` [PATCH v2] work around zsh comment in __git_complete_worktree_paths Sardorbek Imomaliev via GitGitGadget
2021-05-04 3:18 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.943.git.1619685833872.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=sardorbek.imomaliev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.