Opened 11 years ago

Closed 11 years ago

#36334 closed defect (fixed)

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

Reported by: tshubitz@… Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: skymoo (Adam Mercer)
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 (3)

comment:1 Changed 11 years ago by ci42

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

comment:2 Changed 11 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:3 in reply to:  description Changed 11 years ago by ci42

Resolution: fixed
Status: newclosed

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.