git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-completion.bash should not add a space after a ref

From
Manlio Perillo <manlio.perillo@gmail.com>
Date
Jan 12, 2013, 18:35 UTC
Message-ID
<50F1AD0F.7080503@gmail.com>
-----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-----

Next: Junio C Hamano
Message 1 of 2 in “git-completion.bash should not add a space after a ref”
  1. Manlio PerilloJan 12, 2013
  2. Junio C HamanoJan 13, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.