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

Re: [PATCH 3/4] completion: add completer for rev-parse

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Jun 30, 2013, 11:14 UTC
Message-ID
<20130630111436.GB2294@goldbirke>
In-Reply-To
<1372429088-385-4-git-send-email-artagnon@gmail.com>
On Fri, Jun 28, 2013 at 07:48:07PM +0530, Ramkumar Ramachandra wrote:
Show 21 quoted lines
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  contrib/completion/git-completion.bash | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 278018f..f2959a7 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2247,6 +2247,20 @@ _git_reset ()
>  	__gitcomp_nl "$(__git_refs)"
>  }
>  
> +_git_rev_parse ()
> +{
> +	case "$cur" in
> +	--*)
> +		__gitcomp "
> +			--short --show-toplevel --is-inside-work-tree
> +			--symbolic-full-name --verify
> +			"

In the completion script we support porcelain commands. I'm not sure about 'git rev-parse', but I think it's more plumbing than porcelain. However, I think the same about 'git ls-tree' and 'git reflog', too, yet we have support for them in the completion script.

Either way, why these five options? 'git rev-parse' has a lot more options than that.

Show 12 quoted lines
> +               return
> +               ;;
> +	esac
> +	__gitcomp_nl "$(__git_refs)"
> +}
> +
>  _git_revert ()
>  {
>  	case "$cur" in
> -- 
> 1.8.3.1.585.g9832cb9
> 
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 7 of 11 in “Batch completion improvements”
  1. 0/4 Batch completion improvementsRamkumar Ramachandra, Jun 28, 2013
  2. 1/4 completion: complete rebase --edit-todoRamkumar Ramachandra, Jun 28, 2013
  3. 2/4 completion: add completer for statusRamkumar Ramachandra, Jun 28, 2013
  4. SZEDER GáborJun 30, 2013
  5. Ramkumar RamachandraJun 30, 2013
  6. 3/4 completion: add completer for rev-parseRamkumar Ramachandra, Jun 28, 2013
  7. SZEDER GáborJun 30, 2013
  8. Ramkumar RamachandraJun 30, 2013
  9. Junio C HamanoJun 30, 2013
  10. Ramkumar RamachandraJul 3, 2013
  11. 4/4 completion: prefer to use local git-completion.bashRamkumar Ramachandra, Jun 28, 2013

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.