From: Manlio Perillo <manlio.perillo@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: git <git@vger.kernel.org>, Felipe Contreras <felipe.contreras@gmail.com>
Subject: Re: zsh completion broken for file completion
Date: Thu, 28 Feb 2013 19:59:33 +0100 [thread overview]
Message-ID: <512FA915.4080203@gmail.com> (raw)
In-Reply-To: <vpqtxowp9e2.fsf@grenoble-inp.fr>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 28/02/2013 19:43, Matthieu Moy ha scritto:
> Hi,
>
> The completion for e.g. "git add file<tab>" is broken in master. I get
> the following result:
>
> git add fo__gitcomp_file:8: command not found: compgen
>
> The guilty commit is fea16b47b60 (Fri Jan 11 19:48:43 2013, Manlio
> Perillo, git-completion.bash: add support for path completion), which
> introduces a new __gitcomp_file function that uses the bash builtin
> "compgen", without redefining the function in git-completion.zsh.
>
> [...]
> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
> index 4577502..0ba1dcf 100644
> --- a/contrib/completion/git-completion.zsh
> +++ b/contrib/completion/git-completion.zsh
> @@ -60,6 +60,15 @@ __gitcomp_nl ()
> compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
> }
>
> +__gitcomp_file ()
> +{
> + emulate -L zsh
> +
> + local IFS=$'\n'
> + compset -P '*[=:]'
> + compadd -Q -p "${2-}" -- ${=1} && _ret=0
> +}
> +
This patch is implemented in fea16b47b60, but only for the deprecated
zsh compatibility code inside git-completion.bash.
The reason I did not provided a patch for git-completion.zsh was because
there was a bug in this script [1].
If any changes are made to git-completion.zsh, please update
git-completion.bash, too.
[1] Basically, on my system I need the following change at the end of
the file:
-_git
+autoload -U +X compinit && compinit
+compdef _git git gitk
I don't know the reason, however; and it seems that it is a problem
only for me
> [...]
Regards Malio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlEvqRUACgkQscQJ24LbaURASgCeILUTXAiZA6Ndf2DHByJfv4nT
2bMAn1gPqSdfIBzb0cexwYNoAuD5j2+O
=sKTR
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-02-28 19:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 18:43 zsh completion broken for file completion Matthieu Moy
2013-02-28 18:59 ` Manlio Perillo [this message]
2013-04-01 9:30 ` Felipe Contreras
[not found] ` <CAMP44s3=pHAUHohgJxddVdXMRj-toWOEvKea-E02mEZPBLk25w@mail.gmail.com>
2013-04-02 12:47 ` Manlio Perillo
2013-03-05 8:43 ` [PATCH] git-completion.zsh: define __gitcomp_file compatibility function Matthieu Moy
2013-03-05 16:54 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=512FA915.4080203@gmail.com \
--to=manlio.perillo@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.