New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #36334 (closed defect: fixed)

Opened 23 months ago

Last modified 22 months ago

git-core @1.7.12 +bash_completion - __git_ps1: command not found

Reported by: tshubitz@… Owned by: ciserlohn@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: ram@…
Port: git-core

Description

v.1.7.12 of 'git-core' changed the shell script that is used to load the 'bash_completion' shell function.

The current version of this MacPort installs the previous shell script instead of the new script.

See "Git v1.7.12 Release Notes" for verification.

  • A rather heavy-ish "git completion" script has been split to create a separate "git prompting" script, to help lazy-autoloading of the completion part while making prompting part always available.

Changing line 169 in the Portfile should correct the issue.

FROM

${worksrcpath}/contrib/completion/git-completion.bash

TO

${worksrcpath}/contrib/completion/git-prompt.sh

tim shubitz

Change History

comment:1 Changed 23 months ago by ciserlohn@…

  • Owner changed from macports-tickets@… to ciserlohn@…

comment:2 Changed 22 months ago by ram@…

  • Cc ram@… added

Cc Me!

comment:3 in reply to: ↑ description Changed 22 months ago by ciserlohn@…

  • Status changed from new to closed
  • Resolution set to fixed

Replying to tshubitz@…:

Changing line 169 in the Portfile should correct the issue.

FROM

${worksrcpath}/contrib/completion/git-completion.bash

TO

${worksrcpath}/contrib/completion/git-prompt.sh

This won't work. The completion functions are still defined in "git-completion.bash". The separate "git-prompt.sh" is intended to make the prompting part available without using the bash completion part. As of version 1.7.12.1_1 (r98165) "git-prompt.sh" will be installed in /opt/local/share/git-core/. You will have to add something like this to your ~/.bashrc or ~/.profile to use it:

if [ -f /opt/local/share/git-core/git-prompt.sh ]; then
      . /opt/local/share/git-core/git-prompt.sh
fi
Note: See TracTickets for help on using tickets.