Re: bash-completion now loads completions dynamically, so __git_ps1 is not defined when you open a shell
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 28, 2012, 22:17 UTC
- Message-ID
- <7v1uoctlp2.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CANaWP3wu3260uFNzCLJ=YSG1BWFr=ge_6CmMGrG6zLThvFnjcQ@mail.gmail.com>
Kerrick Staley <mail@kerrickstaley.com> writes:
Show 6 quoted lines
> The __git_ps1 function is defined in same script that defines Git's > tab completions (contrib/completion/git-completion.bash). Since > bash-completion loads completions on-the-fly in newer versions, the > __git_ps1 function isn't immediately available in a new shell. How > should this be handled? Should users just source git-completion.bash > before they redefine $PS1?
Sorry, I don't quite get it. "newer verions" of what?
To me, completion scripts have always been to be dot-sourced early, making sure inclusion happen before PS1 is used. Did we change anything recently to break it????