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

Re: [PATCH 2/2] bash: add support for 'git stash pop --index' option

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jun 8, 2009, 16:42 UTC
Message-ID
<g-qSjt6xP9cc8knb-2r7SsV783h1R4c8UDJrPsaIHkYcoFwgq_Dt_Q@cipher.nrlssc.navy.mil>
In-Reply-To
<3456b3a568969b2e0451cdc7a9beebfeb5763039.1244475542.git.szeder@ira.uka.de>
SZEDER Gábor wrote:
Show 21 quoted lines
> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
> ---
>  contrib/completion/git-completion.bash |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index fa899eb..480d85e 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1887,7 +1887,10 @@ _git_stash ()
>  		apply,--*)
>  			__gitcomp "--index"
>  			;;
> -		show,--*|drop,--*|pop,--*|branch,--*)
> +		pop,--*)
> +			__gitcomp "--index"
> +			;;
> +		show,--*|drop,--*|branch,--*)
>  			COMPREPLY=()
>  			;;
>  		show,*|apply,*|drop,*|pop,*|branch,*)

pop takes the same options as apply, so you may want to have just one case statement for the two options. Like:

    apply,--*|pop,--*)
-brandon
Previous: SZEDER GáborNext: Brandon Casey
Message 3 of 9 in “Documentation: mention 'git stash pop --index' option explicitly”
  1. 1/2 Documentation: mention 'git stash pop --index' option explicitlySZEDER Gábor, Jun 8, 2009
  2. 2/2 bash: add support for 'git stash pop --index' optionSZEDER Gábor, Jun 8, 2009
  3. Brandon CaseyJun 8, 2009
  4. Brandon CaseyJun 8, 2009
  5. Junio C HamanoJun 8, 2009
  6. SZEDER GáborJun 8, 2009
  7. 1/2 Documentation: mention 'git stash pop --index' option explicitlySZEDER Gábor, Jun 8, 2009
  8. 2/2 bash: add support for 'git stash pop --index' optionSZEDER Gábor, Jun 8, 2009
  9. Junio C HamanoJun 9, 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.