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

Write-Prompt with $null colors, plus respecting DefaultForegroundColor #454

Merged
merged 3 commits into from
Mar 12, 2017

Conversation

dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented Mar 4, 2017

Write-Prompt -ForgroundColor being required has frustrated me for a while, as has capturing the $Host.UI.RawUI color values when $GitPromptSettings is initialized (meaning posh-git looks wrong if those values are changed after the module is loaded. So I've made -ForegroundColor optional, and defaulted the appropriate settings to $null.

I've also started respecting DefaultForegroundColor again, to align with what I did kind of by accident in #447 (because -ForegroundColor was required). The setting was introduced as a hack for colored Git commands messing with $Host.UI.RawUI.ForegroundColor (02956e1). More recently, it was removed in #202 and restored in #209 to avoid a breaking change. However, since we have it, I suppose we might as well support using it to control the default prompt text color.

powershell_2017-03-04_10-59-00

The setting exists for legacy reasons: 02956e1.
It was removed in #202 and restored in #209 to avoid a breaking change.

Since we still have it, I suppose we might as well support using it to
control the prompt text color.
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.

1 participant