Where should git-prompt.sh be installed?

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

 



Hi,

In olden days the admin would copy contrib/completion/git-completion.sh
to

        /etc/bash_completion.d/git

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

	/usr/share/bash-completion/completions/git

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.

Questions:

 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.

Proposal:

  1) /usr/lib/git-core/git-sh-prompt
  2) git-sh-prompt(1)

Sensible?

Thanks,
Jonathan
--
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]