bash-completion: Try bash completions before simple filetype
authorTed Pavlic <ted@tedpavlic.com>
Thu, 15 Jan 2009 16:02:22 +0000 (11:02 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jan 2009 17:34:54 +0000 (09:34 -0800)
commit50e126e185c196b9b66dcdefb4b05f090d62dd4c
treea32ff197a2b8f56701eeff7c36a306594c6ce0b3
parent25a31f814016891c7728fdebca056ef47ca75547
bash-completion: Try bash completions before simple filetype

When a git completion is not found, a bash shell should try bash-type
completions first before going to standard filetype completions. This
patch adds "-o bashdefault" to the completion line. If that option is
not available, it uses the old method.

This behavior was inspired by Mercurial's bash completion script.

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash