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

Re: [PATCH] bash completion: Add long options for 'git describe'

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 26, 2008, 21:52 UTC
Message-ID
<20080726215210.GC16219@spearce.org>
In-Reply-To
<1217068016-10954-1-git-send-email-trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> wrote:
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Much shorter, thanks.
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Show 20 quoted lines
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 3b04934..4ae8b36 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -665,6 +665,15 @@ _git_commit ()
>  
>  _git_describe ()
>  {
> +	local cur="${COMP_WORDS[COMP_CWORD]}"
> +	case "$cur" in
> +	--*)
> +		__gitcomp "
> +			--all --tags --contains --abbrev= --candidates=
> +			--exact-match --debug --long --match --always
> +			"
> +		return
> +	esac
>  	__gitcomp "$(__git_refs)"
>  }
>  
-- 
Shawn.
Previous: Thomas Rast
Message 6 of 6 in “bash completion: Add long options for 'git describe'”
  1. bash completion: Add long options for 'git describe'Thomas Rast, Jul 25, 2008
  2. SZEDER GáborJul 25, 2008
  3. Shawn O. PearceJul 25, 2008
  4. Thomas RastJul 26, 2008
  5. bash completion: Add long options for 'git describe'Thomas Rast, Jul 26, 2008
  6. Shawn O. PearceJul 26, 2008

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.