git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Sardorbek Imomaliev via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Sardorbek Imomaliev <sardorbek.imomaliev@gmail.com>
Subject: Re: [PATCH v2] work around zsh comment in __git_complete_worktree_paths
Date: Tue, 04 May 2021 12:18:09 +0900	[thread overview]
Message-ID: <xmqqlf8v6vbi.fsf@gitster.g> (raw)
In-Reply-To: <pull.943.v2.git.1620059347674.gitgitgadget@gmail.com> (Sardorbek Imomaliev via GitGitGadget's message of "Mon, 03 May 2021 16:29:07 +0000")

"Sardorbek Imomaliev via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 49e76e9d08cd..73f9fcf493c4 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -3268,9 +3268,10 @@ _git_whatchanged ()
>  __git_complete_worktree_paths ()
>  {
>  	local IFS=$'\n'
> +	# Generate completion reply from worktree list skipping 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')"
>  }

Makes sense.  Thanks, will queue.

      reply	other threads:[~2021-05-04  3:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  8:43 [PATCH] Fix: fix comment for __git_complete_worktree_paths Sardorbek Imomaliev via GitGitGadget
2021-04-30  0:42 ` 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 [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlf8v6vbi.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=sardorbek.imomaliev@gmail.com \
    --subject='Re: [PATCH v2] work around zsh comment in __git_complete_worktree_paths' \
    /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

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).