From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Thomas Rast <trast@student.ethz.ch>
Subject: Re: [PATCH v3] completion: add new _GIT_complete helper
Date: Sun, 6 May 2012 12:30:06 +0200 [thread overview]
Message-ID: <20120506103006.GI2164@goldbirke> (raw)
In-Reply-To: <20120505155423.GA14684@burratino>
On Sat, May 05, 2012 at 10:54:23AM -0500, Jonathan Nieder wrote:
> Felipe Contreras wrote:
>
> > Since v3:
> >
> > * Rename to _GIT_complete to follow bash completion "guidelines"
> > * Get rid of foo_wrap name
>
> Thanks. Gábor, does the "all caps _GIT_ prefix for public API
> functions" convention look like one we should adopt? If I understand
> correctly, previously contrib/completion/git-completion.bash used
> leading double underscores for everything except completion functions,
> so this is a change.
Dunno. I have only three concerns:
- It doesn't contaminate "my" namespace, where my installed programs,
aliases, and shell functions are, i.e. it begins with an underscore.
- Its name conveys that it's git-specific.
- It's not called _git_complete, so the completion script (in
particular at the end of _git()) won't misrecognize it as a
completion function for the 'git complete' command, just in case
somebody ever happens to have such a command or alias.
I'm not sure about the capital letters, but it fulfills all three.
> I personally would be happier with a git_complete function provided
> by another script, like this:
>
> contrib/completion/git-completion.bash:
>
> __git_complete () {
> ...
> }
>
> contrib/completion/bash-helpers.bash:
>
> git_complete () {
> __git_complete "$@"
> }
>
> One might object that if the user includes bash-helpers.bash (name is
> just a strawman) in .bashrc for interactive shells because he is
> defining some custom completion functions,
>
> git<TAB>
>
> would show the git_complete function. I think that's fine.
It depends on what else will go into that bash-helpers.bash file. If
I have to source it to use git completion or the git-specific bash
prompt, then I won't be very happy about it.
> Maybe
> the user would enjoy the reminder.
A reminder for what?
It's a configuration thing, so it will be used in .bashrc; I think
it's quite unlikely that it will be used interactively.
Best,
Gábor
next prev parent reply other threads:[~2012-05-06 10:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-05 15:23 [PATCH v3] completion: add new _GIT_complete helper Felipe Contreras
2012-05-05 15:54 ` Jonathan Nieder
2012-05-05 16:38 ` Felipe Contreras
2012-05-05 16:47 ` Jonathan Nieder
2012-05-05 16:52 ` Jonathan Nieder
2012-05-05 17:20 ` Felipe Contreras
2012-05-05 17:33 ` Jonathan gives feedback --> flamewars inevitable? (Re: [PATCH v3] completion: add new _GIT_complete helper) Jonathan Nieder
2012-05-05 18:23 ` Felipe Contreras
2012-05-05 18:39 ` Jonathan gives feedback --> flamewars inevitable? Jonathan Nieder
2012-05-05 18:42 ` Jonathan Nieder
2012-05-06 5:23 ` Jonathan gives feedback --> flamewars inevitable? (Re: [PATCH v3] completion: add new _GIT_complete helper) Tay Ray Chuan
2012-05-14 9:11 ` Felipe Contreras
2012-05-05 17:44 ` [PATCH v3] completion: add new _GIT_complete helper Jonathan Nieder
2012-05-06 10:30 ` SZEDER Gábor [this message]
2012-05-06 20:47 ` Jonathan Nieder
2012-05-06 11:14 ` SZEDER Gábor
2012-05-06 11:30 ` SZEDER Gábor
2012-05-06 11:36 ` SZEDER Gábor
2012-05-06 12:12 ` SZEDER Gábor
2012-05-06 20:53 ` Felipe Contreras
2012-05-06 20:37 ` Felipe Contreras
2012-05-06 23:32 ` SZEDER Gábor
2012-05-07 0:20 ` Felipe Contreras
2012-05-07 9:22 ` SZEDER Gábor
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=20120506103006.GI2164@goldbirke \
--to=szeder@ira.uka.de \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=trast@student.ethz.ch \
/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).