git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manlio Perillo <manlio.perillo@gmail.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>,
	"Felipe Contreras" <felipe.contreras@gmail.com>
Subject: git-completion.bash should not add a space after a ref
Date: Sat, 12 Jan 2013 19:35:59 +0100	[thread overview]
Message-ID: <50F1AD0F.7080503@gmail.com> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

This is not really a bug, but a small usability problem.

When completing a reference, Bash will add a space after the reference name.

As an example in:

    $git show master<TAB>

The problem is that an user may want to show a tree or blog object from
master:

    $git show master:git.c


A possible solution is to define a new __gitcomp_nospace function and
use it where appropriate.

Probably the __gitcomp_nospace should be used when git_complete_file is
called, and __gitcomp_nl should be used when __git_complete_revlist  is
called, but I'm not sure.

P.S.:
it seems that __gitcomp_nl is **never** called with 4 arguments.



Regards  Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlDxrQ8ACgkQscQJ24LbaURHmACfRXoM+uEVDgFUtZFzUcPC5oSZ
FGsAnAxQf+SN7GrNljxU1io4IuayHmed
=JRVU
-----END PGP SIGNATURE-----

             reply	other threads:[~2013-01-12 18:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 18:35 Manlio Perillo [this message]
2013-01-13 23:16 ` git-completion.bash should not add a space after a ref Junio C Hamano

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=50F1AD0F.7080503@gmail.com \
    --to=manlio.perillo@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.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).