-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
Default Prompt Colors #520
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice adds. I like it!
And export Get-PromptPath to expose our default path logic
I just pushed an additional commit to pivot from |
@@ -282,6 +282,27 @@ function Get-PathStringComparison { | |||
} | |||
} | |||
|
|||
function Get-PromptPath { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's tempting to add parameters to this function Iike -AbbreviateHomeDir
and -PathTruncateLimit
which would eliminate the need for the equivalent $GitPromptSettings but the "discoverability" of this functionality would be very poor. Probably best to leave those in $GitPromptSettings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly how I started, but moved away from it in favor of keeping the default DefaultPromptPath
text simple ('$(Get-PromptPath)'
).
Much easier to close #474 with the changes from #513.
DefaultPromptPrefix
,DefaultPromptSuffix
andDefaultPromptDebugSuffix
are nowPoshGitTextSpan
s that understand colorsandDefaultPromptPathColor
DefaultPromptTimingColor
are supported, tooUpdate: Also closes #469 by:
Get-PromptPath
with our default ($GitPromptSettings
-based) path behaviorDefaultPromptPath
(also aPoshGitTextSpan
) to control colors and the string to expand whenprompt
executes ('$(Get-PromptPath)'
by default)To customize how the path is displayed, the user would do something like...