* [PATCH 2/2] completion: add git status
@ 2016-05-31 23:42 Thomas Braun
2016-06-01 4:07 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Braun @ 2016-05-31 23:42 UTC (permalink / raw)
To: git; +Cc: Ramkumar Ramachandra, Junio C Hamano, John Keeping, SZEDER Gábor
Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
---
contrib/completion/git-completion.bash | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 57a0acc..96b7d86 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1782,6 +1782,35 @@ _git_stage ()
_git_add
}
+_git_status ()
+{
+ case "$cur" in
+ --ignore-submodules=*)
+ __gitcomp "none untracked dirty all" "" "${cur##--ignore-submodules=}"
+ return
+ ;;
+ --untracked-files=*)
+ __gitcomp "$(__git_untracked_file_modes)" "" "${cur##--untracked-files=}"
+ return
+ ;;
+ --column=*)
+ __gitcomp "
+ always never auto column row plain dense nodense
+ " "" "${cur##--column=}"
+ return
+ ;;
+ --*)
+ __gitcomp "
+ --short --branch --porcelain --long --verbose
+ --untracked-files= --ignore-submodules= --ignored
+ --column= --no-column
+ "
+ return
+ ;;
+ esac
+ __git_complete_file
+}
+
__git_config_get_set_variables ()
{
local prevword word config_file= c=$cword
--
2.8.3.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] completion: add git status
2016-05-31 23:42 [PATCH 2/2] completion: add git status Thomas Braun
@ 2016-06-01 4:07 ` Jeff King
2016-06-01 9:05 ` Thomas Braun
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2016-06-01 4:07 UTC (permalink / raw)
To: Thomas Braun
Cc: git, Ramkumar Ramachandra, Junio C Hamano, John Keeping,
SZEDER Gábor
On Wed, Jun 01, 2016 at 01:42:18AM +0200, Thomas Braun wrote:
> Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
> ---
> contrib/completion/git-completion.bash | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 57a0acc..96b7d86 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1782,6 +1782,35 @@ _git_stage ()
> _git_add
> }
> +_git_status ()
This patch has the same funniness as the other. Weird.
> +{
> + case "$cur" in
> + --ignore-submodules=*)
> + __gitcomp "none untracked dirty all" "" "${cur##--ignore-submodules=}"
> + return
> + ;;
> + --untracked-files=*)
> + __gitcomp "$(__git_untracked_file_modes)" "" "${cur##--untracked-files=}"
Same comment on $() here.
> + return
> + ;;
> + --column=*)
> + __gitcomp "
> + always never auto column row plain dense nodense
> + " "" "${cur##--column=}"
> + return
> + ;;
> + --*)
> + __gitcomp "
> + --short --branch --porcelain --long --verbose
> + --untracked-files= --ignore-submodules= --ignored
> + --column= --no-column
> + "
> + return
> + ;;
> + esac
> + __git_complete_file
> +}
The rest of it (both the overall goal, and the patch itself) look OK to
me.
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] completion: add git status
2016-06-01 4:07 ` Jeff King
@ 2016-06-01 9:05 ` Thomas Braun
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Braun @ 2016-06-01 9:05 UTC (permalink / raw)
To: Jeff King
Cc: git, Junio C Hamano, SZEDER Gábor, Ramkumar Ramachandra,
John Keeping
> Jeff King <peff@peff.net> hat am 1. Juni 2016 um 06:07 geschrieben:
>
>
> On Wed, Jun 01, 2016 at 01:42:18AM +0200, Thomas Braun wrote:
>
> > Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
> > ---
> > contrib/completion/git-completion.bash | 29 +++++++++++++++++++++++++++++
> > 1 file changed, 29 insertions(+)
> >
> > diff --git a/contrib/completion/git-completion.bash
> > b/contrib/completion/git-completion.bash
> > index 57a0acc..96b7d86 100644
> > --- a/contrib/completion/git-completion.bash
> > +++ b/contrib/completion/git-completion.bash
> > @@ -1782,6 +1782,35 @@ _git_stage ()
> > _git_add
> > }
> > +_git_status ()
>
> This patch has the same funniness as the other. Weird.
Should be fixed now.
> > +{
> > + case "$cur" in
> > + --ignore-submodules=*)
> > + __gitcomp "none untracked dirty all" "" "${cur##--ignore-submodules=}"
> > + return
> > + ;;
> > + --untracked-files=*)
> > + __gitcomp "$(__git_untracked_file_modes)" "" "${cur##--untracked-files=}"
>
> Same comment on $() here.
Fixed.
> > + return
> > + ;;
> > + --column=*)
> > + __gitcomp "
> > + always never auto column row plain dense nodense
> > + " "" "${cur##--column=}"
> > + return
> > + ;;
> > + --*)
> > + __gitcomp "
> > + --short --branch --porcelain --long --verbose
> > + --untracked-files= --ignore-submodules= --ignored
> > + --column= --no-column
> > + "
> > + return
> > + ;;
> > + esac
> > + __git_complete_file
> > +}
>
> The rest of it (both the overall goal, and the patch itself) look OK to
> me.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-01 9:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 23:42 [PATCH 2/2] completion: add git status Thomas Braun
2016-06-01 4:07 ` Jeff King
2016-06-01 9:05 ` Thomas Braun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.