git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Danny Yates <mail4danny@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	"Anders Kaseorg" <andersk@MIT.EDU>,
	"Felipe Contreras" <felipe.contreras@gmail.com>,
	"Ted Pavlic" <ted@tedpavlic.com>,
	"SZEDER Gábor" <szeder@ira.uka.de>,
	"Dan McGee" <dan@archlinux.org>
Subject: Re: Where should git-prompt.sh be installed?
Date: Thu, 25 Oct 2012 07:02:27 +0100	[thread overview]
Message-ID: <3B606942-D194-4148-AF6E-1F3283C983ED@googlemail.com> (raw)
In-Reply-To: <20121025005106.GA9112@elie.Belkin>

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".

Danny. 


On 25 Oct 2012, at 01:51, Jonathan Nieder <jrnieder@gmail.com> wrote:

> 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

  parent reply	other threads:[~2012-10-25  6:02 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 20:46 [PATCH 0/2] completion: split into git-prompt.sh Felipe Contreras
2012-05-22 20:46 ` [PATCH 1/2] completion: remove executable mode Felipe Contreras
2012-05-22 20:46 ` [PATCH 2/2] completion: split __git_ps1 into a separate script Felipe Contreras
2012-05-22 21:07   ` Zbigniew Jędrzejewski-Szmek
2012-05-22 22:29     ` Ted Pavlic
2012-05-23 11:56       ` Felipe Contreras
2012-05-23 11:59     ` Felipe Contreras
2012-05-23 14:54     ` Junio C Hamano
2012-05-23 15:40       ` Felipe Contreras
2012-05-23 16:30         ` Junio C Hamano
2012-05-23 17:03         ` Ted Pavlic
2012-05-23 20:50           ` Felipe Contreras
2012-05-23 21:55             ` Ted Pavlic
2012-05-24 20:35               ` SZEDER Gábor
     [not found]                 ` <CAOnadRFbrhrFz7Ya3Vhgsju9G723Qu0OdJnM31xFmBqQNgj6gA@mail.gmail.com>
2012-05-25  7:35                   ` SZEDER Gábor
2012-05-25  7:50                     ` Thomas Rast
2012-05-25 10:01                       ` Felipe Contreras
2012-05-25 18:03                       ` Junio C Hamano
2012-05-24 20:49         ` SZEDER Gábor
2012-05-22 22:27   ` Ted Pavlic
2012-05-23 11:53     ` Felipe Contreras
2012-05-23 14:59       ` Junio C Hamano
2012-05-24 20:47   ` SZEDER Gábor
2012-05-25 17:51     ` Ville Skyttä
2012-10-25  0:51   ` Where should git-prompt.sh be installed? Jonathan Nieder
2012-10-25  1:59     ` Drew Northup
2012-10-25  6:02     ` Danny Yates [this message]
2012-10-25  7:45       ` [RFC/PATCH] __git_ps1: migrate out of contrib/completion Jonathan Nieder
2012-10-25 14:19         ` Felipe Contreras
2012-11-08 13:19         ` Todd Zullinger
2012-10-25  8:10       ` Where should git-prompt.sh be installed? Anders Kaseorg
2012-10-25 15:11     ` SZEDER Gábor
2012-10-25 16:12       ` Jonathan Nieder
2012-05-23 16:33 ` [PATCH 0/2] completion: split into git-prompt.sh Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B606942-D194-4148-AF6E-1F3283C983ED@googlemail.com \
    --to=mail4danny@gmail.com \
    --cc=andersk@MIT.EDU \
    --cc=dan@archlinux.org \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=szeder@ira.uka.de \
    --cc=ted@tedpavlic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).