git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-completion.tcsh and git-completion.zsh are broken?
@ 2013-01-09 19:17 Manlio Perillo
  2013-01-09 20:21 ` Marc Khouzam
  0 siblings, 1 reply; 3+ messages in thread
From: Manlio Perillo @ 2013-01-09 19:17 UTC (permalink / raw
  To: git@vger.kernel.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I have finally resolved all the problems with my path completion in
git-completion.bash and, in order to avoid regressions, I'm checking the
git-completion.zsh and git-completion.tcsh scripts, since they use the
bash completion support.

I have installed (Debian 6.0.6):
* zsh 4.3.10 (i686-pc-linux-gnu)
* tcsh 6.17.02 (Astron) 2010-05-12 (i586-intel-linux)
  options wide,nls,dl,al,kan,rh,nd,color,filec

Note that I'm using my modified git-completion.bash script.


zsh compatibility support in git-completion.bash seems to "work" (I just
get a segmentation fault ...), however I have problems with the .zsh and
.tcsh scripts.


$zsh
synapsis% source contrib/completion/git-completion.zsh
(anon):6: command not found: ___main
_git:11: command not found: _default

I have disabled compinit autoload (since, I don't know how, it is able
to find the git completion script)


$tcsh
synapsis:~/projects/git/contrib/git> source ~/.git-completion.tcsh
synapsis:~/projects/git/contrib/git> git show HEAD:<TAB>

does not show the file list for the tree object in the HEAD

another problem is that a space is added after a directory name.


Another problem with zsh:

$zsh
synapsis% git show HEAD:<TAB>569GPXZims

I don't know where that 569GPXZims came from.


Can someone else confirm these problems?


Thanks  Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlDtwjcACgkQscQJ24LbaURpuACfVQnoBC3tzvxB0JYxQ5aL3rmN
8GEAnA7OjVtPqz+aq/PGtNtTHWgFqhKK
=3UdZ
-----END PGP SIGNATURE-----

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

* RE: git-completion.tcsh and git-completion.zsh are broken?
  2013-01-09 19:17 git-completion.tcsh and git-completion.zsh are broken? Manlio Perillo
@ 2013-01-09 20:21 ` Marc Khouzam
  2013-01-09 20:56   ` Manlio Perillo
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Khouzam @ 2013-01-09 20:21 UTC (permalink / raw
  To: 'Manlio Perillo', 'git@vger.kernel.org'


> -----Original Message-----
> From: git-owner@vger.kernel.org 
> [mailto:git-owner@vger.kernel.org] On Behalf Of Manlio Perillo
> Sent: Wednesday, January 09, 2013 2:17 PM
> To: git@vger.kernel.org
> Subject: git-completion.tcsh and git-completion.zsh are broken?
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi.
> 
> I have finally resolved all the problems with my path completion in
> git-completion.bash and, in order to avoid regressions, I'm 
> checking the
> git-completion.zsh and git-completion.tcsh scripts, since they use the
> bash completion support.
> 
> I have installed (Debian 6.0.6):
> * zsh 4.3.10 (i686-pc-linux-gnu)
> * tcsh 6.17.02 (Astron) 2010-05-12 (i586-intel-linux)
>   options wide,nls,dl,al,kan,rh,nd,color,filec
> 
> Note that I'm using my modified git-completion.bash script.
> 
> 
> zsh compatibility support in git-completion.bash seems to 
> "work" (I just
> get a segmentation fault ...), however I have problems with 
> the .zsh and
> .tcsh scripts.
> 
> 
> $zsh
> synapsis% source contrib/completion/git-completion.zsh
> (anon):6: command not found: ___main
> _git:11: command not found: _default
> 
> I have disabled compinit autoload (since, I don't know how, it is able
> to find the git completion script)
> 
> 
> $tcsh
> synapsis:~/projects/git/contrib/git> source ~/.git-completion.tcsh
> synapsis:~/projects/git/contrib/git> git show HEAD:<TAB>
> 
> does not show the file list for the tree object in the HEAD

Hm.  That doesn't work for me either.  I'll look into it.
It is not caused by your changes.

> another problem is that a space is added after a directory name.

The lastest version of git-completion.tcsh in the pu branch should
fix that problem.  It was committed yesterday so you may not have it.

> 
> 
> Another problem with zsh:
> 
> $zsh
> synapsis% git show HEAD:<TAB>569GPXZims
> 
> I don't know where that 569GPXZims came from.
> 
> 
> Can someone else confirm these problems?
> 
> 
> Thanks  Manlio
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAlDtwjcACgkQscQJ24LbaURpuACfVQnoBC3tzvxB0JYxQ5aL3rmN
> 8GEAnA7OjVtPqz+aq/PGtNtTHWgFqhKK
> =3UdZ
> -----END PGP SIGNATURE-----
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: git-completion.tcsh and git-completion.zsh are broken?
  2013-01-09 20:21 ` Marc Khouzam
@ 2013-01-09 20:56   ` Manlio Perillo
  0 siblings, 0 replies; 3+ messages in thread
From: Manlio Perillo @ 2013-01-09 20:56 UTC (permalink / raw
  To: Marc Khouzam; +Cc: 'git@vger.kernel.org'

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 09/01/2013 21:21, Marc Khouzam ha scritto:
> [...]
> 
> $zsh
> synapsis% source contrib/completion/git-completion.zsh
> (anon):6: command not found: ___main
> _git:11: command not found: _default
> 
> I have disabled compinit autoload (since, I don't know how, it is able
> to find the git completion script)
> 

The attached patch seems to fix it.
I'm still getting segmentation faults, but only when I try to complete
git rm contrib/<TAB> (in the git repository).

Sorry if this is a plain patch.
The code is simply copied from the one found in git-completion.bash.


I also noted that zsh on my system have preinstalled git completion
support (enabled with autoload).
The code is not the one available in the git source tree.
I don't know if the code is from Debian or zsh.

> 
> $tcsh
> synapsis:~/projects/git/contrib/git> source ~/.git-completion.tcsh
> synapsis:~/projects/git/contrib/git> git show HEAD:<TAB>
> 
> does not show the file list for the tree object in the HEAD
> 
>> Hm.  That doesn't work for me either.  I'll look into it.
>> It is not caused by your changes.
> 
> another problem is that a space is added after a directory name.
> 
>> The lastest version of git-completion.tcsh in the pu branch should
>> fix that problem.  It was committed yesterday so you may not have it.
> 

Ok, thanks.



Regards  Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlDt2ZoACgkQscQJ24LbaUR/ggCfYNbRrM1HzHWYDwkejNP/hD9k
ShkAnjv3JapVXPlj59CakY4kwaE/4z5J
=qYP5
-----END PGP SIGNATURE-----

[-- Attachment #2: git-completion.zsh.patch --]
[-- Type: text/x-diff, Size: 320 bytes --]

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 4577502..4aeda2a 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -75,4 +75,5 @@ _git ()
 	return _ret
 }
 
-_git
+autoload -U +X compinit && compinit
+compdef _git git gitk

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

end of thread, other threads:[~2013-01-09 20:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09 19:17 git-completion.tcsh and git-completion.zsh are broken? Manlio Perillo
2013-01-09 20:21 ` Marc Khouzam
2013-01-09 20:56   ` Manlio Perillo

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

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).