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

Re: [PATCHv2 2/2] completion: complete config variables for --get/getall/unset/unset-all

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 9, 2009, 03:44 UTC
Message-ID
<20090509034438.GZ30527@spearce.org>
In-Reply-To
<1241832213-23070-3-git-send-email-bebarino@gmail.com>
Stephen Boyd <bebarino@gmail.com> wrote:
Show 8 quoted lines
> This should make it easier for users to get and unset their
> configuration variables without having to open documentation or dig
> through their configuration file.
> 
> Signed-off-by: Stephen Boyd <bebarino@gmail.com>
> ---
>  contrib/completion/git-completion.bash |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)

These probably could have been one patch, since the function is introduced only to support this one usage, and this patch is only 4 lines larger than the function definition anyway...

But yea, this series is better.
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Show 18 quoted lines
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index e73359c..ad26b7c 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1417,6 +1417,10 @@ _git_config ()
>  		__gitcomp "$__git_send_email_suppresscc_options"
>  		return
>  		;;
> +	--get|--get-all|--unset|--unset-all)
> +		__gitcomp "$(__git_config_get_set_variables)"
> +		return
> +		;;
>  	*.*)
>  		COMPREPLY=()
>  		return
> -- 
> 1.6.3
> 
-- 
Shawn.
Previous: Stephen BoydNext: Stephen Boyd
Message 4 of 9 in “[PATCHv2 0/2] completion: config --unset/get”
  1. Stephen BoydMay 9, 2009
  2. 1/2 completion: add __git_config_get_set_variables() to get config variablesStephen Boyd, May 9, 2009
  3. 2/2 completion: complete config variables for --get/getall/unset/unset-allStephen Boyd, May 9, 2009
  4. Shawn O. PearceMay 9, 2009
  5. Stephen BoydMay 12, 2009
  6. Junio C HamanoMay 12, 2009
  7. Stephen BoydMay 12, 2009
  8. Junio C HamanoMay 13, 2009
  9. Stephen BoydMay 13, 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.