{"thread":{"id":"38352","subject":"[PATCH] bash completion: allow git stash store options completion","startedAt":"2015-01-13T17:53:32Z","lastAt":"2015-01-14T20:06:32Z","messageCount":4,"participants":["Alexander Kuleshov","Junio C Hamano","brian m. carlson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"254607","messageId":"1421171612-12058-1-git-send-email-kuleshovmail@gmail.com","threadId":"38352","inReplyTo":null,"subject":"[PATCH] bash completion: allow git stash store options completion","fromName":"Alexander Kuleshov","fromEmail":"kuleshovmail@gmail.com","sentAt":"2015-01-13T17:53:32Z","receivedAt":"2015-01-13T17:53:32Z","isPatch":true,"sender":{"key":"kuleshovmail@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2699235?v=4"},"body":"This patch adds bash completion for git stash 'store' subcommand\nwhich apperead at bd514cad (stash: introduce 'git stash store', 18 Jun 2013)\n\nSigned-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>\n---\n contrib/completion/git-completion.bash | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex c21190d..7578266 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2375,7 +2375,7 @@ _git_show_branch ()\n _git_stash ()\n {\n \tlocal save_opts='--keep-index --no-keep-index --quiet --patch'\n-\tlocal subcommands='save list show apply clear drop pop create branch'\n+\tlocal subcommands='save list show apply clear drop pop create branch store'\n \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n \tif [ -z \"$subcommand\" ]; then\n \t\tcase \"$cur\" in\n@@ -2402,6 +2402,9 @@ _git_stash ()\n \t\t\t__gitcomp_nl \"$(git --git-dir=\"$(__gitdir)\" stash list \\\n \t\t\t\t\t| sed -n -e 's/:.*//p')\"\n \t\t\t;;\n+\t\tstore,--*)\n+\t\t\t__gitcomp \"--message --quiet\"\n+\t\t\t;;\n \t\t*)\n \t\t\t;;\n \t\tesac\n-- \n2.3.0.rc0.239.g0ae1f56.dirty\n"},{"id":"254612","messageId":"xmqq7fwqed7b.fsf@gitster.dls.corp.google.com","threadId":"38352","inReplyTo":"1421171612-12058-1-git-send-email-kuleshovmail@gmail.com","subject":"Re: [PATCH] bash completion: allow git stash store options completion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-13T18:40:40Z","receivedAt":"2015-01-13T18:40:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexander Kuleshov <kuleshovmail@gmail.com> writes:\n\n> This patch adds bash completion for git stash 'store' subcommand\n> which apperead at bd514cad (stash: introduce 'git stash store', 18 Jun 2013)\n>\n> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>\n> ---\n\nHmph.  The \"create\" and \"store\" subcommands are not end-user facing;\nthey are meant to be used in scripts.  I am not sure if we want to\ncomplete them in the first place.  I know \"create\" already is in the\nlist of completion candidates, but I wonder if adding \"store\" is\nmaking things worse.\n\nI dunno.\n\n>  contrib/completion/git-completion.bash | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index c21190d..7578266 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -2375,7 +2375,7 @@ _git_show_branch ()\n>  _git_stash ()\n>  {\n>  \tlocal save_opts='--keep-index --no-keep-index --quiet --patch'\n> -\tlocal subcommands='save list show apply clear drop pop create branch'\n> +\tlocal subcommands='save list show apply clear drop pop create branch store'\n>  \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n>  \tif [ -z \"$subcommand\" ]; then\n>  \t\tcase \"$cur\" in\n> @@ -2402,6 +2402,9 @@ _git_stash ()\n>  \t\t\t__gitcomp_nl \"$(git --git-dir=\"$(__gitdir)\" stash list \\\n>  \t\t\t\t\t| sed -n -e 's/:.*//p')\"\n>  \t\t\t;;\n> +\t\tstore,--*)\n> +\t\t\t__gitcomp \"--message --quiet\"\n> +\t\t\t;;\n>  \t\t*)\n>  \t\t\t;;\n>  \t\tesac\n"},{"id":"254679","messageId":"20150114190345.GC32115@vauxhall.crustytoothpaste.net","threadId":"38352","inReplyTo":"xmqq7fwqed7b.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] bash completion: allow git stash store options completion","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2015-01-14T19:03:46Z","receivedAt":"2015-01-14T19:03:46Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Tue, Jan 13, 2015 at 10:40:40AM -0800, Junio C Hamano wrote:\n>Alexander Kuleshov <kuleshovmail@gmail.com> writes:\n>\n>> This patch adds bash completion for git stash 'store' subcommand\n>> which apperead at bd514cad (stash: introduce 'git stash store', 18 Jun 2013)\n>>\n>> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>\n>> ---\n>\n>Hmph.  The \"create\" and \"store\" subcommands are not end-user facing;\n>they are meant to be used in scripts.  I am not sure if we want to\n>complete them in the first place.  I know \"create\" already is in the\n>list of completion candidates, but I wonder if adding \"store\" is\n>making things worse.\n\nFor what it's worth, I'll often sketch out a script at the command line \nbefore putting it in a file (either because I realize I'll need to do \nthe same thing again or I want to share it with others), so I think this \nmight be a useful addition.\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187\n"},{"id":"254684","messageId":"xmqq1tmx9lfb.fsf@gitster.dls.corp.google.com","threadId":"38352","inReplyTo":"20150114190345.GC32115@vauxhall.crustytoothpaste.net","subject":"Re: [PATCH] bash completion: allow git stash store options completion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T20:06:32Z","receivedAt":"2015-01-14T20:06:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\n\"brian m. carlson\" <sandals@crustytoothpaste.net> writes:\n\n[administrivia: please refrain from using Mail-follow-up-to]\n\n> For what it's worth, I'll often sketch out a script at the command\n> line before putting it in a file (either because I realize I'll need\n> to do the same thing again or I want to share it with others), so I\n> think this might be a useful addition.\n\nYes, but that applies to manual pages and possibly \"-h\" short hint;\nkeeping completion that is unnecessary for end-users has cost, e.g.\nmaking unique prefix longer.\n"}]}