Re: [PATCH] tcsh-completion re-using git-completion.bash
- From
Marc Khouzam <marc.khouzam@gmail.com>
- Date
- Nov 20, 2012, 14:58 UTC
- Message-ID
- <CAFj1UpHs08seVH8Kb3CuoNTaF+x6vA+ybVTEu0TyLX8NYuuidQ@mail.gmail.com>
- In-Reply-To
- <CAMP44s30wYnkQdq8yup3z-t=FEf1R+k8OC-o7-uY=19z9VHDPg@mail.gmail.com>
On Sat, Nov 17, 2012 at 1:01 PM, Felipe Contreras <felipe.contreras@gmail.com> wrote:
Show 15 quoted lines
>
>> I gather that using a wrapper for zsh causes concerns about
>> backwards-compatibility.
>
> I don't see any concerns.
>
>> if [[ -n ${ZSH_VERSION-} ]]; then
>> # replace below by zsh completion commands calling `bash
>> ${HOME}/.git-completion.bash`
>
>> complete git 'p/*/`bash ${HOME}/.git-completion.bash ${COMMAND_LINE}`/'
>> complete gitk 'p/*/`bash ${HOME}/.git-completion.bash ${COMMAND_LINE}`/'
>
> That doesn't work in zsh. It might be possible to do something
> similar, but it would probably require many more lines.Hi,
since there doesn't seem to be an agreement that the approach to achieve tcsh git-completion would be useful for zsh (the other possible shell that could use it is ksh, but I haven't looked into that), maybe the simplest thing is to keep the tcsh solution contained in a tcsh-only script. This is the latest solution as proposed here:
[1] http://www.mail-archive.com/git@vger.kernel.org/msg12192.html
For reference, the more general solution was proposed here: [2] http://www.mail-archive.com/git@vger.kernel.org/msg12122.html
If there is interest in merging [1], please let me know and I'll post another version which adds a check to make sure that the user properly copied git-completion.bash to be used by the new git-completion.tcsh.
Thanks for your input.
Marc