On 2012-08-25 10:09, Todd Zullinger wrote:
Enrico Scholz wrote:
Todd Zullinger <tmz@xxxxxxxxx> writes:
Doing this would break current users that have already configured
their system to use __git_ps1().
What are "current users"? Those who installed your just released
rawhide changes?
No, it breaks anyone that's currently using __git_ps1(), as the function
was previously defined in /etc/bash_completion.d/git. Newer releases of
bash-completion are moving to on-demand loading, hence upstream git has
split out the __git_ps1() function and a few other support functions.
Not having this available for current users means anyone with
__git_ps1() in their prompt will get an ugly error every time they hit
return, e.g.:
bash: __git_ps1: command not found
That's far more annoying to far more people than having this function in
the environment, in my opinion.
I don't see the compelling reason to jump through hoops or expect users
to make more changes than needed to enable git info in their prompts.
Without some justification of harm, I'm not inclined to change this.
What's the reason to strongly oppose this being in /etc/profile.d?
It's the fact that you're now adding functions to *every* shell, whereas
before it was just bash, and then only for people who opted into
completion. Since git-prompt.sh makes no attempt to whitelist (or even
blacklist) shells for compatibility its code will unconditionally
attempt to run, whether doing so will result in errors or not.
Since you're looking to maintain compatibility with bash users who rely
on that function, is there another, bash-specific location where that
file could go? Or might it make more sense to add a simple whitelist or
some other check to the top of the file instead?
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel