git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org, "SZEDER Gábor" <szeder@ira.uka.de>,
	"Thomas Rast" <trast@student.ethz.ch>
Subject: Re: [PATCH v2] completion: add new git_complete helper
Date: Mon, 16 Apr 2012 23:04:52 +0300	[thread overview]
Message-ID: <CAMP44s2_VYNFeBi9GPa9CeqT=oRmSq1J1XaSP+aKgC6bJ55Lfg@mail.gmail.com> (raw)
In-Reply-To: <20120416160729.GM5813@burratino>

On Mon, Apr 16, 2012 at 7:07 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Junio C Hamano wrote:
>
>> I am OK with introducing git_ps1 while keeping __git_ps1 as an equivalent
>> and declare that git_$anything will be the surface interface for end users
>> to *use* the machinery we provide, though.
>
> The problem is that completion scripts are often included implicitly
> in .profile through the bash completion machinery.  Users do not have
> to explicitly ask for them, so there is no reason for users to expect
> that the function name "more_cowbell" is dangerous to use in .profile
> because some day the completion script for the "more" command will
> start using it.

Sure, that's why we would have _git_cowbell instead, so for *most* of
functions the user would have no trouble, it would *only* be
git_completion the one without prefix, and I think the name is quite
safe. There's quite likely few, probably nobody, actually using that
function name in their profiles.

Also, the script would now be loaded only *after*, the user types 'git
<TAB>'. And there's already a bunch of functions that are already
exported by just having bash completion: have(), quote(), dequote(),
quote_readline(). And there's at least one script that uses a function
without a prefix: ri_get_methods()

I would like to see a completion script that actually has a function
supposed to be exported and that still uses the _ prefix anyway.

Cheers.

-- 
Felipe Contreras

  parent reply	other threads:[~2012-04-16 20:05 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-15 21:20 [PATCH v2] completion: add new git_complete helper Felipe Contreras
2012-04-15 21:37 ` Jonathan Nieder
2012-04-16 10:49   ` Felipe Contreras
2012-04-16 15:54     ` Junio C Hamano
2012-04-16 16:07       ` Jonathan Nieder
2012-04-16 16:32         ` Junio C Hamano
2012-04-16 20:04         ` Felipe Contreras [this message]
2012-04-16 20:09           ` Jonathan Nieder
2012-04-16 20:30             ` Felipe Contreras
2012-04-16 20:33               ` Jonathan Nieder
2012-04-16 20:42                 ` Felipe Contreras
2012-04-16 20:46                   ` Jonathan Nieder
2012-04-16 20:51                     ` Felipe Contreras
2012-04-16 20:59                       ` Jonathan Nieder
2012-04-21  7:20                         ` Ville Skyttä
2012-04-21 15:41                           ` [Bash-completion-devel] " Felipe Contreras
2012-04-21 17:39                             ` Ville Skyttä
2012-04-22 12:58                               ` Felipe Contreras
2012-04-16 20:51                 ` Junio C Hamano
2012-04-16 21:09                   ` Felipe Contreras
2012-04-16 22:44                     ` Jonathan Nieder
2012-04-16 23:04                       ` Felipe Contreras
2012-04-16 23:05                         ` Jonathan Nieder
2012-04-16 23:16                         ` Jonathan Nieder
2012-04-17  7:10                           ` Felipe Contreras
2012-04-17  7:36                             ` Jonathan Nieder
2012-04-17  7:56                               ` Felipe Contreras
2012-04-17  8:06                                 ` Jonathan Nieder
2012-04-17  8:22                                 ` Jonathan Nieder
2012-04-16 16:00     ` Jonathan Nieder
2012-04-16 22:15   ` SZEDER Gábor
2012-04-16 22:33     ` Felipe Contreras
2012-04-17 15:50       ` Junio C Hamano
2012-04-17 16:13         ` Felipe Contreras
2012-04-17 18:15           ` Junio C Hamano
2012-04-17 20:53             ` Felipe Contreras
2012-04-17 21:08               ` Jonathan Nieder
2012-04-17 22:14               ` SZEDER Gábor
2012-04-17 22:19                 ` Felipe Contreras
2012-04-17 17:50         ` 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='CAMP44s2_VYNFeBi9GPa9CeqT=oRmSq1J1XaSP+aKgC6bJ55Lfg@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=szeder@ira.uka.de \
    --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).