Re: bash-completion now loads completions dynamically, so __git_ps1 is not defined when you open a shell

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

 



On Wed, Mar 28, 2012 at 07:00:35PM -0500, Kerrick Staley wrote:

> bash-completion 1.99 (still a "beta", but Arch Linux now ships it)
> will automatically source the git-completion.bash script when you type
> git <tab>. The script is no longer sourced when you first open a
> shell.
> 
> There are two main ways to fix this:
> 1) define __git_ps1 (and friends) in a different script, which will
> get installed in /etc/profile.d (this is the "proper way")
> 2) require that git-completion.bash always be loaded in the beginning
> instead of on-the-fly (which is how it works now now)

I would much rather see (1). There is a very good reason for
bash-completion doing dynamic loading, which is that loading all of the
completions made shell startup horribly slow. We should do our part to
help keep startup fast by splitting the dynamically-loadable bits from
the must-be-loaded-at-start bits.

-Peff
--
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]