zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _git: fix gitk
@ 2011-04-22 17:43 Felipe Contreras
  2011-04-25  8:19 ` Frank Terbeck
  0 siblings, 1 reply; 8+ messages in thread
From: Felipe Contreras @ 2011-04-22 17:43 UTC (permalink / raw)
  To: zsh-workers; +Cc: Nikolai Weibull, Felipe Contreras

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Completion/Unix/Command/_git |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 640fa07..92227f4 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
+#compdef git git-cvsserver git-receive-pack git-upload-archive git-upload-pack git-shell gitk
 
 # Some parts of this completion's behaviour are configurable:
 #
@@ -4463,8 +4463,7 @@ _git_commands () {
     stash:'stash away changes to dirty working directory'
     status:'show working-tree status'
     submodule:'initialize, update, or inspect submodules'
-    tag:'create, list, delete or verify tag object signed with GPG'
-    gitk:'brows the repository interactively')
+    tag:'create, list, delete or verify tag object signed with GPG')
 
   local -a ancillary_manipulator_commands
   ancillary_manipulator_commands=(
@@ -5959,6 +5958,11 @@ __git_color_attributes () {
   _describe -t attributes attribute attributes $*
 }
 
+(( $+functions[_gitk] )) ||
+_gitk () {
+  _git-log
+}
+
 # Now, for the main driver…
 _git() {
   if (( CURRENT > 2 )); then
-- 
1.7.5.rc3


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] _git: fix gitk
  2011-04-22 17:43 [PATCH] _git: fix gitk Felipe Contreras
@ 2011-04-25  8:19 ` Frank Terbeck
  2011-04-25 11:16   ` Felipe Contreras
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Terbeck @ 2011-04-25  8:19 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: zsh-workers, Nikolai Weibull

Felipe Contreras wrote:
> +(( $+functions[_gitk] )) ||
> +_gitk () {
> +  _git-log
> +}

This is certainly better than what we did before (which was
"nothing"). Does `gitk' support all `git-log' options?

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] _git: fix gitk
  2011-04-25  8:19 ` Frank Terbeck
@ 2011-04-25 11:16   ` Felipe Contreras
  2011-04-25 11:49     ` Frank Terbeck
  0 siblings, 1 reply; 8+ messages in thread
From: Felipe Contreras @ 2011-04-25 11:16 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers, Nikolai Weibull

On Mon, Apr 25, 2011 at 10:19 AM, Frank Terbeck <ft@bewatermyfriend.org> wrote:
> Felipe Contreras wrote:
>> +(( $+functions[_gitk] )) ||
>> +_gitk () {
>> +  _git-log
>> +}
>
> This is certainly better than what we did before (which was
> "nothing"). Does `gitk' support all `git-log' options?

It allows them, but some of them are ignored.

-- 
Felipe Contreras


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] _git: fix gitk
  2011-04-25 11:16   ` Felipe Contreras
@ 2011-04-25 11:49     ` Frank Terbeck
  2011-04-25 12:28       ` Simon Ruderich
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Terbeck @ 2011-04-25 11:49 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: zsh-workers, Nikolai Weibull

Felipe Contreras wrote:
> On Mon, Apr 25, 2011 at 10:19 AM, Frank Terbeck <ft@bewatermyfriend.org> wrote:
[...]
>> This is certainly better than what we did before (which was
>> "nothing"). Does `gitk' support all `git-log' options?
>
> It allows them, but some of them are ignored.

Ah okay.  I've committed the patch then. Thanks!

Regards, Frank


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] _git: fix gitk
  2011-04-25 11:49     ` Frank Terbeck
@ 2011-04-25 12:28       ` Simon Ruderich
  2011-04-25 12:36         ` Frank Terbeck
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Ruderich @ 2011-04-25 12:28 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

On Mon, Apr 25, 2011 at 01:49:48PM +0200, Frank Terbeck wrote:
> Felipe Contreras wrote:
>> On Mon, Apr 25, 2011 at 10:19 AM, Frank Terbeck wrote:
> [...]
>>> This is certainly better than what we did before (which was
>>> "nothing"). Does `gitk' support all `git-log' options?
>>
>> It allows them, but some of them are ignored.
>
> Ah okay.  I've committed the patch then. Thanks!
>
> Regards, Frank

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?

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] _git: fix gitk
  2011-04-25 12:28       ` Simon Ruderich
@ 2011-04-25 12:36         ` Frank Terbeck
  2011-04-25 13:23           ` [PATCH] _git: Add support for tig similar to gitk. (Was: [PATCH] _git: fix gitk) Simon Ruderich
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Terbeck @ 2011-04-25 12:36 UTC (permalink / raw)
  To: Simon Ruderich; +Cc: zsh-workers

Simon Ruderich wrote:
> On Mon, Apr 25, 2011 at 01:49:48PM +0200, Frank Terbeck wrote:
>> Felipe Contreras wrote:
>>> On Mon, Apr 25, 2011 at 10:19 AM, Frank Terbeck wrote:
>> [...]
>>>> This is certainly better than what we did before (which was
>>>> "nothing"). Does `gitk' support all `git-log' options?
>>>
>>> It allows them, but some of them are ignored.
>>
>> Ah okay.  I've committed the patch then. Thanks!
>>
>> Regards, Frank
>
> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] _git: Add support for tig similar to gitk. (Was: [PATCH] _git: fix gitk)
  2011-04-25 12:36         ` Frank Terbeck
@ 2011-04-25 13:23           ` Simon Ruderich
  2011-04-25 15:03             ` [PATCH] _git: Add support for tig similar to gitk Frank Terbeck
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Ruderich @ 2011-04-25 13:23 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

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 #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] _git: Add support for tig similar to gitk.
  2011-04-25 13:23           ` [PATCH] _git: Add support for tig similar to gitk. (Was: [PATCH] _git: fix gitk) Simon Ruderich
@ 2011-04-25 15:03             ` Frank Terbeck
  0 siblings, 0 replies; 8+ messages in thread
From: Frank Terbeck @ 2011-04-25 15:03 UTC (permalink / raw)
  To: Simon Ruderich; +Cc: zsh-workers

Simon Ruderich wrote:
[...]
> I use tig as console-based replacement for gitk - this patch adds
> the same completion for tig (tig also accepts all git log
> arguments).

Right. Committed as well.

Regards, Frank


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-25 15:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-22 17:43 [PATCH] _git: fix gitk Felipe Contreras
2011-04-25  8:19 ` Frank Terbeck
2011-04-25 11:16   ` Felipe Contreras
2011-04-25 11:49     ` Frank Terbeck
2011-04-25 12:28       ` Simon Ruderich
2011-04-25 12:36         ` Frank Terbeck
2011-04-25 13:23           ` [PATCH] _git: Add support for tig similar to gitk. (Was: [PATCH] _git: fix gitk) Simon Ruderich
2011-04-25 15:03             ` [PATCH] _git: Add support for tig similar to gitk Frank Terbeck

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).