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

Re: [PATCH] bash completion: complete refs for git-grep

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2009, 23:42 UTC
Message-ID
<7v4oq46uyd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091012142710.GI9261@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 7 quoted lines
> Thomas Rast <trast@student.ethz.ch> wrote:
>> > So I'll roll a simpler patch that just always (before --) completes
>> > refs instead, if that's ok.
>
> Hard to argue with that logic.  :-)
>
> Acked-by: Shawn O. Pearce <spearce@spearce.org>
Thanks.
Show 20 quoted lines
>
>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
>> index 6fd7e1d..b08cd77 100755
>> --- a/contrib/completion/git-completion.bash
>> +++ b/contrib/completion/git-completion.bash
>> @@ -1048,7 +1048,8 @@ _git_grep ()
>>  		return
>>  		;;
>>  	esac
>> -	COMPREPLY=()
>> +
>> +	__gitcomp "$(__git_refs)"
>>  }
>
> -- 
> Shawn.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Shawn O. Pearce
Message 6 of 6 in “bash completion: complete refs for git-grep”
  1. bash completion: complete refs for git-grepThomas Rast, Oct 6, 2009
  2. Shawn O. PearceOct 6, 2009
  3. Thomas RastOct 7, 2009
  4. bash completion: complete refs for git-grepThomas Rast, Oct 12, 2009
  5. Shawn O. PearceOct 12, 2009
  6. Junio C HamanoOct 12, 2009

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.