From: Jonathan Nieder <jrnieder@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, "Stefan Haller" <lists@haller-berlin.de>,
"SZEDER Gábor" <szeder@ira.uka.de>,
"Mark Lodato" <lodatom@gmail.com>
Subject: Re: [PATCH] git-completion: fix zsh support
Date: Tue, 26 Apr 2011 21:21:17 -0500 [thread overview]
Message-ID: <20110427022117.GA16697@elie> (raw)
In-Reply-To: <1303867612-15975-1-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras wrote:
> +++ b/contrib/completion/git-completion.bash
[...]
> @@ -739,12 +739,12 @@ __git_complete_revlist ()
>
> __git_complete_remote_or_refspec ()
> {
> - local cur words cword
> - _get_comp_words_by_ref -n =: cur words cword
> - local cmd="${words[1]}"
> + local cur cwords cword
> + _get_comp_words_by_ref -n =: cur cwords cword
Hmm, on second thought, this will break the following case, in bash:
. /etc/bash_completion; # defines _get_comp_words_by_ref
. contrib/completion/git-completion.bash
Not sure how to salvage that. Maybe we need a git-specific API
that wraps _get_comp_words_by_ref when the latter is available.
if type _get_comp_words_by_ref >/dev/null 2>&1; then
_git_get_comp_words_by_ref () {
_get_comp_words_by_ref "$@"
if test "${words+set}"
then
cword="${words[@]}"
fi
}
else
_git_get_comp_words_by_ref () {
...
}
fi
prev parent reply other threads:[~2011-04-27 2:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 1:26 [PATCH] git-completion: fix zsh support Felipe Contreras
2011-04-27 1:35 ` Jonathan Nieder
2011-04-27 1:42 ` Felipe Contreras
2011-04-27 4:55 ` Junio C Hamano
2011-04-27 6:40 ` [RFC/PATCH] completion: avoid "words" as variable name for zsh portability Jonathan Nieder
2011-04-27 8:42 ` Felipe Contreras
2011-04-27 9:11 ` Jonathan Nieder
2011-04-27 9:49 ` Felipe Contreras
2011-04-27 9:59 ` John Szakmeister
2011-04-27 10:09 ` Felipe Contreras
2011-04-27 21:27 ` [PATCH] completion: move private shopt shim for zsh to __git_ namespace Jonathan Nieder
2011-04-27 22:48 ` Felipe Contreras
2011-04-27 23:00 ` Jonathan Nieder
2011-05-06 5:46 ` Jonathan Nieder
2011-05-06 8:35 ` Felipe Contreras
2011-05-08 10:48 ` SZEDER Gábor
2011-04-28 16:01 ` [RFC/PATCH] completion: avoid "words" as variable name for zsh portability SZEDER Gábor
2011-04-28 16:01 ` [PATCH 1/3] bash: don't modify the $cur variable in completion functions SZEDER Gábor
2011-04-28 16:01 ` [PATCH 2/3] bash: remove unnecessary _get_comp_words_by_ref() invocations SZEDER Gábor
2011-04-28 16:01 ` [PATCH 3/3] bash: don't declare 'local words' to make zsh happy SZEDER Gábor
2011-05-03 17:53 ` Felipe Contreras
2011-04-28 20:24 ` [RFC/PATCH] completion: avoid "words" as variable name for zsh portability Felipe Contreras
2011-04-28 20:52 ` Junio C Hamano
2011-04-28 21:27 ` Felipe Contreras
2011-04-27 8:20 ` [PATCH] git-completion: fix zsh support Felipe Contreras
2011-04-27 16:56 ` Junio C Hamano
2011-04-27 17:17 ` Felipe Contreras
2011-04-27 2:21 ` Jonathan Nieder [this message]
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=20110427022117.GA16697@elie \
--to=jrnieder@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=lists@haller-berlin.de \
--cc=lodatom@gmail.com \
--cc=szeder@ira.uka.de \
/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.