Re: [PATCH 2/4] completion: add completer for status

2013-06-30 Thread Ramkumar Ramachandra
SZEDER Gábor wrote:
> The code is OK, the rest of the function is pretty straightforward,
> but I think this line would warrant a sentence in the log message,

Okay.

  Complete untracked pathspecs (--others), and overlay HEAD tree on
index (--with-tree=HEAD) to complete pathspecs that have been removed
from the filesystem + staged in the index.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/4] completion: add completer for status

2013-06-30 Thread SZEDER Gábor
On Fri, Jun 28, 2013 at 07:48:06PM +0530, Ramkumar Ramachandra wrote:
> + __git_complete_index_file "--with-tree=HEAD --cached --others"

The code is OK, the rest of the function is pretty straightforward,
but I think this line would warrant a sentence in the log message,
considering that at first you also wondered what '--with-tree=HEAD' is
about.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] completion: add completer for status

2013-06-28 Thread Ramkumar Ramachandra
Helped-by: SZEDER Gábor 
Signed-off-by: Ramkumar Ramachandra 
---
 contrib/completion/git-completion.bash | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/contrib/completion/git-completion.bash 
b/contrib/completion/git-completion.bash
index b51c9e3..278018f 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1699,6 +1699,33 @@ _git_stage ()
_git_add
 }
 
+_git_status ()
+{
+   case "$cur" in
+   --untracked-files=*)
+   __gitcomp "no normal all" "" "${cur##--untracked-files=}"
+   return
+   ;;
+   --ignore-submodules=*)
+   __gitcomp "none untracked dirty all" "" 
"${cur##--ignore-submodules=}"
+   return
+   ;;
+   --column=*)
+   __gitcomp "always never auto column row plain dense nodense" "" 
"${cur##--column=}"
+   return
+   ;;
+   --*)
+   __gitcomp "
+   --short --branch --long --porcelain --ignored
+   --untracked-files --ignore-submodules --column
+   --untracked-files= --ignore-submodules= --column=
+   "
+   return
+   ;;
+   esac
+   __git_complete_index_file "--with-tree=HEAD --cached --others"
+}
+
 __git_config_get_set_variables ()
 {
local prevword word config_file= c=$cword
-- 
1.8.3.1.585.g9832cb9

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html