On Mon, Apr 25, 2011 at 02:36:22PM +0200, Frank Terbeck wrote:
> Simon Ruderich wrote:
>> The patch doesn't work for me. gitk <tab> just lists files names,
>> gitk --<tab> lists no completions. git log <tab> works fine. _git
>> is correctly loaded and other changes in it work fine. What am I
>> doing wrong here?
>
> The "#compdef" line changed. Thus, you'll need to remove ~/.zcompdump
> and restart zsh.
>
> Regards, Frank
Hi Frank,
Thanks - I always forget that one. Works fine.
I use tig as console-based replacement for gitk - this patch adds
the same completion for tig (tig also accepts all git log
arguments).
Regards,
Simon
---
Completion/Unix/Command/_git | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 0a71280..4664cfa 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1,4 +1,4 @@
-#compdef git git-cvsserver git-receive-pack git-upload-archive git-upload-pack git-shell gitk
+#compdef git git-cvsserver git-receive-pack git-upload-archive git-upload-pack git-shell gitk tig
# Some parts of this completion's behaviour are configurable:
#
@@ -5966,6 +5966,11 @@ _gitk () {
_git-log
}
+(( $+functions[_tig] )) ||
+_tig () {
+ _git-log
+}
+
# Now, for the main driver…
_git() {
if (( CURRENT > 2 )); then
--
1.7.5
--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
Attachment:
pgp1L5Tf4jfIb.pgp
Description: PGP signature