From: Peter van der Does <peter@avirtualhome.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: "Jonathan Nieder" <jrnieder@gmail.com>,
git@vger.kernel.org, "SZEDER Gábor" <szeder@ira.uka.de>,
"Shawn O. Pearce" <spearce@spearce.org>,
"Marc Branchaud" <marcnarc@xiplink.com>,
"Brian Gernhardt" <brian@gernhardtsoftware.com>,
"Kevin Ballard" <kevin@sb.org>,
"Mathias Lafeldt" <misfire@debugon.org>
Subject: Re: [PATCH v2/RFC] Make git-completion Bash 4 compatible.
Date: Thu, 28 Oct 2010 14:46:49 -0400 [thread overview]
Message-ID: <20101028144649.0f7b13b6@MonteCarlo> (raw)
In-Reply-To: <m31v7ai9c2.fsf@localhost.localdomain>
On Thu, 28 Oct 2010 09:15:45 -0700 (PDT)
Jakub Narebski <jnareb@gmail.com> wrote:
> Peter van der Does <peter@avirtualhome.com> writes:
> > On Wed, 27 Oct 2010 19:54:55 -0500
> > Jonathan Nieder <jrnieder@gmail.com> wrote:
> >
> > > Peter van der Does wrote:
> > >
> > > > The bash completion script could still be included with the
> > > > core, but we can offer different versions for different shells.
> > >
> > > Why? That's three times the maintenance work.
> >
> > The cons of everything in one script:
> > - If the script needs an update the submitter has to take in account
> > the different coding standards each shell has. Examples of this
> > have been given in the commit message of 06f44c3 (completion: make
> > compatible with zsh, 2010-09-06)
> >
> > - The script could end up with a slew of if statements to see which
> > shell the script is running in and taking some action.
> >
> > - Shells don't share all the same functions, the script could be
> > filled with functions not needed in other shells. the zsh patch
> > includes one, the Bash 4 patch includes several.
> >
> > The pros of everything in one script:
> > - Small changes, like adding an extra option to a git command for
> > completion only have to implemented in one script.
>
> What about having separate scripts, but sourcing common library that
> doesn't do completion, but just provides list of possible completions?
> This would be best of both worlds, I think.
>
That would be the best solution.
I believe it's very hard to accomplish though.
The options for completion are determined within each completion
function, and depending on the option a decision on what to offer the
user is made.
The way to decide which option is given and what to offer differs, some
functions use for/next loops, some use case <var>.
--
Peter van der Does
GPG key: E77E8E98
IRC: Ganseki on irc.freenode.net
Twitter: @petervanderdoes
next prev parent reply other threads:[~2010-10-28 18:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 17:15 [PATCH v2/RFC] Make git-completion Bash 4 compatible Peter van der Does
2010-10-27 17:23 ` Brian Gernhardt
2010-10-27 17:31 ` Jonathan Nieder
2010-10-27 22:53 ` SZEDER Gábor
2010-10-28 0:52 ` Peter van der Does
2010-10-28 0:54 ` Jonathan Nieder
2010-10-28 12:14 ` Peter van der Does
2010-10-28 16:15 ` Jakub Narebski
2010-10-28 18:46 ` Peter van der Does [this message]
2010-10-27 22:39 ` SZEDER Gábor
2010-10-28 0:48 ` Jonathan Nieder
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=20101028144649.0f7b13b6@MonteCarlo \
--to=peter@avirtualhome.com \
--cc=brian@gernhardtsoftware.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=jrnieder@gmail.com \
--cc=kevin@sb.org \
--cc=marcnarc@xiplink.com \
--cc=misfire@debugon.org \
--cc=spearce@spearce.org \
--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 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 NNTP newsgroup(s).