Skip to content

Feature request: BeforePath/AfterPath  #821

Closed
@breisfeld

Description

Great package!

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

For example

$GitPromptSettings.BeforePath = '<'
$GitPromptSettings.AfterPath = '>'

Activity

rkeithhill

rkeithhill commented on Dec 16, 2020

@rkeithhill
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

breisfeld commented on Dec 16, 2020

@breisfeld
ContributorAuthor

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

breisfeld commented on Dec 16, 2020

@breisfeld
ContributorAuthor

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Feature request: BeforePath/AfterPath · Issue #821 · dahlbyk/posh-git