Re: [PATCH] Add tcsh-completion support to contrib by using git-completion.bash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 13, 2012 at 07:31:45PM +0100, Felipe Contreras wrote:
> On Mon, Nov 12, 2012 at 9:07 PM, Marc Khouzam <marc.khouzam@xxxxxxxxx> wrote:
> > +       # Call _git() or _gitk() of the bash script, based on the first
> > +       # element of the command-line
> > +       _${COMP_WORDS[0]}
> 
> You might want to use __${COMP_WORDS[0]}_main instead.

That wouldn't work.  __git_main() doesn't set up the
command-line-specific variables, but the wrapper around it does.


> > +# Make the script executable if it is not
> > +if ( ! -x ${__git_tcsh_completion_script} ) then
> > +       chmod u+x ${__git_tcsh_completion_script}
> > +endif
> 
> Why not just source it?

The goal is to re-use a Bash script to do completion in tcsh.  They
are two different breeds, tcsh doesn't grok bash.  So sourcing the
completion script is not an option, but we can still run it via Bash
and use it's results.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]