git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] bash completion: complete CHERRY_PICK_HEAD

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 7, 2021, 22:21 UTC
Message-ID
<xmqq35w1ybvu.fsf@gitster.g>
In-Reply-To
<patch-1.1-483669af7fc-20210407T105035Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 8 quoted lines
> -			for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD; do
> +			for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD; do
>  				case "$i" in
>  				$match*)
>  					if [ -e "$dir/$i" ]; then
>						echo "$pfx$i$sfx"
>					fi
>					;;
Hmph, it gets tempting to do this instead:
	for i in $(cd "$dir/" && echo HEAD *_HEAD)
	do
		case "$i" in
		$match*)
			echo "$pfx$i$sfx"
			;;
		esac
	done
but I am no completion expert, so I'll queue the patch as-is.
Thanks.
Previous: Ævar Arnfjörð Bjarmason
Message 2 of 2 in “bash completion: complete CHERRY_PICK_HEAD”
  1. bash completion: complete CHERRY_PICK_HEADÆvar Arnfjörð Bjarmason, Apr 7, 2021
  2. Junio C HamanoApr 7, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.