git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kerrick Staley <mail@kerrickstaley.com>
Cc: git@vger.kernel.org
Subject: Re: bash-completion now loads completions dynamically, so __git_ps1 is not defined when you open a shell
Date: Wed, 28 Mar 2012 15:17:13 -0700	[thread overview]
Message-ID: <7v1uoctlp2.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CANaWP3wu3260uFNzCLJ=YSG1BWFr=ge_6CmMGrG6zLThvFnjcQ@mail.gmail.com> (Kerrick Staley's message of "Wed, 28 Mar 2012 15:27:20 -0500")

Kerrick Staley <mail@kerrickstaley.com> writes:

> 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????

  reply	other threads:[~2012-03-28 22:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28 20:27 bash-completion now loads completions dynamically, so __git_ps1 is not defined when you open a shell Kerrick Staley
2012-03-28 22:17 ` Junio C Hamano [this message]
2012-03-29  5:57   ` Jeff King
2012-03-28 23:06 ` Jonathan Nieder
2012-03-29  0:00   ` Kerrick Staley
2012-03-29  5:49     ` Jeff King
2012-04-07 13:01     ` Felipe Contreras
2012-04-07 13:47       ` Jonathan Nieder

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

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

  git send-email \
    --in-reply-to=7v1uoctlp2.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mail@kerrickstaley.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.
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 NNTP newsgroup(s).