git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Manlio Perillo <manlio.perillo@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-completion.bash: add support for path completion
Date: Tue, 18 Dec 2012 17:25:44 +0100	[thread overview]
Message-ID: <50D09908.6020007@gmail.com> (raw)
In-Reply-To: <7vzk1clb3n.fsf@alter.siamese.dyndns.org>

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

Il 17/12/2012 20:42, Junio C Hamano ha scritto:
> [...]
>>> I am not sure how you would handle the last parameter to "git mv",
>>> though.  That is by definition a path that does not exist,
>>> i.e. cannot be completed.
>>
>> Right, the code should be changed.
>> No completion should be done for the second parameter.
> 
> I deliberately wrote "the last" not "the second", as you can do
> 
> 	$ mkdir X
>         $ git mv COPYING README X/.
> 

The patch is ready, however I decided to leave git mv completion simple.
Pressing <TAB> will always try to autocomplete using all cached files.
I have added a note to remember it needs more work.


P.S.:
git-completion.bash has a lot of other things that may be improved:

* adding missing commands
 (as an example, there is strangely no custom support fot "git status")

* completion support for commands like "git checkout" is not complete.
  "git checkout <TAB>" will correctly try to complete the tree-ish,
  however "git checkout HEAD -- <TAB>" will try to complete the path
  using *all* files in the working directory.

  This is easy to fix, using the new functions I have added

* not all long options are supported.
  The script documentation says that only common long options are
  supported, so I'm not sure it is ok to add support for all available
  long options.


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

iEYEARECAAYFAlDQmQgACgkQscQJ24LbaUSw9QCfT1lCH/yjA4Lgmb2nMspNWM3l
hMMAn26UxWesuoOxMbuwhqaypPjkmN84
=Wh4c
-----END PGP SIGNATURE-----

  reply	other threads:[~2012-12-18 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-16 21:24 [PATCH] git-completion.bash: add support for path completion Manlio Perillo
2012-12-17  4:50 ` Junio C Hamano
2012-12-17 11:17   ` Manlio Perillo
2012-12-17 19:42     ` Junio C Hamano
2012-12-18 16:25       ` Manlio Perillo [this message]
2012-12-19 22:02       ` Manlio Perillo
2012-12-19 22:49         ` Junio C Hamano
2012-12-19 23:50           ` Manlio Perillo

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50D09908.6020007@gmail.com \
    --to=manlio.perillo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).