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

Feature request: BeforePath/AfterPath #821

Closed
breisfeld opened this issue Dec 15, 2020 · 3 comments · Fixed by #822
Closed

Feature request: BeforePath/AfterPath #821

breisfeld opened this issue Dec 15, 2020 · 3 comments · Fixed by #822

Comments

@breisfeld
Copy link
Contributor

Great package!

It would be nice to be able to specify characters that surround the path.

For example

$GitPromptSettings.BeforePath = '<'
$GitPromptSettings.AfterPath = '>'
@rkeithhill
Copy link
Collaborator

You can already do this e.g.:

C:\Users\Keith\GitHub\dahlbyk\posh-git\src [rkeithhill/adj-path-abbrev+0 ~2 -0 !]
> $GitPromptSettings.DefaultPromptPath = '<<$(Get-PromptPath)>>'
<<C:\Users\Keith\GitHub\dahlbyk\posh-git\src>> [rkeithhill/adj-path-abbrev+0 ~2 -0 !]
>

@breisfeld
Copy link
Contributor Author

I should have been more clear.

If I use something like
$GitPromptSettings.DefaultPromptPath.ForegroundColor = 'Blue',
I'd like the theoretical $GitPromptSettings.BeforePath and $GitPromptSettings.AfterPath segments not to inherit this color.

This seems to be the way that $GitPromptSettings.BeforeStatus and $GitPromptSettings.AfterStatus behave relative to Status.

@breisfeld
Copy link
Contributor Author

I created PR #822 to add this feature.

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 a pull request may close this issue.

2 participants