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

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 12, 2009, 14:27 UTC
Message-ID
<20091012142710.GI9261@spearce.org>
In-Reply-To
<9f58ba1e7db9702d1b0594a8016c204e3d50b72f.1255337776.git.trast@student.ethz.ch>
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>
Show 12 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.
Previous: Thomas RastNext: Junio C Hamano
Message 5 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.