Re: [PATCH] git-completion.bash: add support for path completion
- From
Manlio Perillo <manlio.perillo@gmail.com>
- Date
- Dec 19, 2012, 22:02 UTC
- Message-ID
- <50D23960.4070108@gmail.com>
- 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:
Show 23 quoted lines
> [...] >>> 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/. > > You do need to expand the second parameter to README when the user > types > > git mv COPYING REAMDE X > > then goes back with \C-b to "M", types \C-d three times to remove > "MDE", and then finally says <TAB>, to result in > > git mv COPYING README X >
Assuming X is a new untracked directory, do you think it is an usability problem if an user try to do:
git mv COPYING README <TAB>
and X does not appear in the completion list?
As far as I know, the solution is to only support custom expansion the first parameter, unless the user will do something like:
git mv COPYING README -- <TAB>
Regards Manlio
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDSOWAACgkQscQJ24LbaUSOnACfds93RtX1CDOeGbwCGM5/N8HI yVwAn0AZEO6rE083gKgFimGIbiRTyN5Z =z7K5 -----END PGP SIGNATURE-----