Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore pre-0.7 posh-git prompt #425

Merged
merged 1 commit into from
Feb 22, 2017
Merged

Ignore pre-0.7 posh-git prompt #425

merged 1 commit into from
Feb 22, 2017

Conversation

dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented Feb 17, 2017

Inspired by #423, here's a relatively simple fix for folks who copied the old prompt function into their $PROFILE. I've tried to make it relatively tolerant of tabs/spaces, CRLF/LF, etc.

@dahlbyk dahlbyk added this to the v0.7.1 milestone Feb 17, 2017
Copy link
Collaborator

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the old profile.example.ps1 defines the prompt function after importing posh-git, then we won't see that prompt function during import.

@dahlbyk
Copy link
Owner Author

dahlbyk commented Feb 17, 2017

I don't think there is much we can do about that, short of teaching Write-GitSatus to check prompt. That doesn't feel appropriate.

It may be that this change doesn't fix enough problems for us to bother maintaining.

@rkeithhill
Copy link
Collaborator

It may be that this change doesn't fix enough problems for us to bother maintaining.

Yup, although we could add a command to "fix up" the user's profile to remove the old stuff. Or maybe even modify Add-PoshGitToProfile to do that, perhaps with an -Update or -Force parameter.

@dahlbyk
Copy link
Owner Author

dahlbyk commented Feb 17, 2017

Ambivalence is fun! Leaning toward leaving it because it's not much code, and it at least does warn me locally that the "wrong" prompt is being used, even though it's not able to actually override that prompt (this is in GitHub Desktop). Doesn't catch everything, but it seems better than not reporting a problematic situation that we can detect.

@dahlbyk dahlbyk merged commit 43086a2 into master Feb 22, 2017
@dahlbyk dahlbyk deleted the old-posh-git-prompt branch February 22, 2017 02:57
dahlbyk added a commit that referenced this pull request Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants