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

Re: [PATCH] Teach git-completion about git p4

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 24, 2012, 16:12 UTC
Message-ID
<7vbogv1ju2.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1348264271-99395-1-git-send-email-rcumming@ea.com>
Ryan Cumming <etaoins@gmail.com> writes:
Show 9 quoted lines
> From: Ryan Cumming <etaoins@gmail.com>
>
> git p4 was moved out of contrib in 1.7.11 but it git-completion didn't
> know about it. Add git p4 completion based on the existing SVN
> completion. It covers all known subcommands and options except for the
> -/ option for clone which doesn't use the standard -- prefix.
>
> Signed-off-by: Ryan Cumming <etaoins@gmail.com>
> ---
Sounds sensible; thanks.
Show 12 quoted lines
> +_git_p4 ()
> +{
> +...
> +		local submit_opts="
> +			--origin= -M --preserve-user --export-labels
> +			$common_opts
> +			"
> +
> +		case "$subcommand,$cur" in
> ...
> +		submit,--*)
> +			__gitcomp "$submit_opts"

This is taken when $cur begins with --, but $submit_opts includes "-M" which doesn't begin with it. Is that a problem?

Show 7 quoted lines
> +			;;
> +		submit,*)
> +			__gitcomp "$(__git_refs)"
> +			;;
> +		esac
> +	fi
> +}
Previous: Ryan CummingNext: Pete Wyckoff
Message 2 of 3 in “Teach git-completion about git p4”
  1. Teach git-completion about git p4Ryan Cumming, Sep 21, 2012
  2. Junio C HamanoSep 24, 2012
  3. Pete WyckoffSep 26, 2012

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.