-
-
Notifications
You must be signed in to change notification settings - Fork 811
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-VcsStatus behaving differently #612
Comments
A lot has changed WRT to the way the Git status is written in order to support ANSI capable hosts. I have a way to fix you prompt function above but I think you'd be better off just using the new customization support in v1. Put this settings right after you import posh-git:
|
If you want to use your old prompt function, change it to this:
Essentially the
That object array outuput is not accepted by PowerShell. You can see this by executing:
So outputting just |
In the process of coming up with a
This will give a prompt like this: BTW if you ran only on PS Core, you could use the esc char
|
Thank you for all that. I ended up modifying my |
@dahlbyk I think this actually reveals a subtle bug that could trip up folks moving from v0.x to v1 and are running in a host without VT support. This is somewhat of a corner case scenario given the v1 requires PS v5. But if someone has v5 installed on Win7, they could hit it. The issue is this. In v0.x,
However, in v1 when AnsiConsole is $false and we use In order to fix this, we'd have to modify |
This seems like it should be simple to fix, isn't it? |
I think so. I'll submit a PR so we can see what the changes look like. |
Issue Description
I have a custom multi-lines prompt that used to work with v0.6.1.20160330 of posh-git. The git status stays on the first line. The second line contains just the right angle bracket. Now I have installed it on a new machine, and git status is appearing in the second line.
Here's the content of my profile script:
I have somewhat limited understanding of Powershell and can't remember how I cobbled up that prompt. What I was trying to achieve there is an updated timestamp in the prompt every time a command is executed.
Any ideas why
Write-VcsStatus
now inserts a newline before it?The text was updated successfully, but these errors were encountered: