Would that not give the impression of "git sh-prompt" being a core command? If
so, that would be poor, IMHO.
When I was investigating this last night, I expected to find it (git-prompt.sh)
in contrib, although that doesn't make an enormous amount of sense. Ideally,
the full path to wherever it's installed should be mentioned in the bash
completion file (which is where I went to look when __git_ps1 stopped working),
but that would mean modifying a file from upstream and I'm not sure if that's
easy/"the done thing".
On 25 Oct 2012, at 01:51, Jonathan Nieder <jrnie...@gmail.com> wrote:
> In olden days the admin would copy contrib/completion/git-completion.sh
> and mortals could source /etc/bash_completion or
> /etc/bash_completion.d/git in their ~/.bashrc (possibly shared among
> multiple machines) so that the bash completion and __git_ps1 helpers
> could work.
> With Git 1.7.12 __git_ps1 has been split into a separate file, to help
> users who only want __git_ps1 to avoid the overhead of loading the
> entire completion script (and allow the completion script to be loaded
> by bash-completion magic on the fly!). Now the sysadmin should copy
> contrib/completion/git-completion.sh to
> and contrib/completion/git-prompt.sh to
> /usr/share/git-core/contrib/?? (somewhere?)
> Mortals source /etc/bash_completion in their ~/.bashrc (possibly
> shared among multiple machines) and expect bash completion to work.
> For __git_ps1, users should source that ?? path.
> 1) what path is appropriate for ?? above?
> 2) is this documented anywhere?
> Possible answers:
> 1) Fedora uses /etc/profile.d/git-prompt.sh. Gentoo uses
> /usr/share/bash-completion/git-prompt. Maybe others use
> some other path.
> 2) The scripts themselves suggest copying to ~/.git-completion.sh
> and ~/.git-prompt.sh.
> 1) /usr/lib/git-core/git-sh-prompt
> 2) git-sh-prompt(1)
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html