Re: Bash completion Issue?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Chandler <alan@xxxxxxxxxxxxxxxxxxxxx> wrote:
> When I type a normal command on the bash command line (say emacs) followed by 
> the partial directory name the completion completes the directory and then 
> adds a slash.  If I type a git command (say git update-index) with the same 
> partial directory name it completes the directory, but then adds a space.  I 
> have to backspace, manually add the slash, before continuing with the next 
> directory or filename.

Hmm.  I just tried 'git update-index' and it completed here for
me as you want it to (this is with the current stock Git bash
completion support).

However we do some funny things when completing into trees.  E.g. the
completion support for 'git ls-tree man:man<tab>' may seem a little
strange but it works well for my fingers.  I've never really had
any problem with it.

I think the only way we differ from normal bash completion is we
sometimes don't add a space after fully completing a path name.
Usually the user has to type the space in by hand.
 
> In debian, there seems to be a directory /etc/bash_completion.d with files for 
> each of the packages, and the debian git packages have entries in there.  So 
> I assume they are derived from the completion work mentioned on this list.

What completion script is it?  The one that is now shipped as part
of Git has a header of the following, and resides in git.git as
contrib/completion/git-completion.bash:

	#
	# bash completion support for core Git.
	#
	# Copyright (C) 2006 Shawn Pearce
	# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
	#

> What seems strange to me is that nobody else has mentioned this before now.

Maybe because you have a different completion script?

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]