Name Value
---- -----
PSVersion 6.0.0-beta
PSEdition Core
GitCommitId v6.0.0-beta.7
OS Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-37...
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
My prompt is duplicated:
10:35 $ powershell
PowerShell v6.0.0-beta.7
Copyright (C) Microsoft Corporation. All rights reserved.
/Users/felix/git/vscode [master 鈮> /Users/felix/git/vscode [master 鈮
further typing causes weird behavior:

Thanks for the bug report. I can duplicate it on WSL/Bash. I'll take a look at it.
Awesome, this is blocking me atm from using PowerShell as my primary terminal 鉂わ笍
posh-git version/path: 0.7.1
How did you install posh-git? I would expect a different version number if you were using the develop branch, which has a few cross-platform fixes.
I followed the readme: PowerShellGet\Install-Module posh-git -Scope CurrentUser
I wanted to try the develop version but could not find any instructions on how to install that.
Unfortunately the PowerShell Gallery doesn't support prerelease versions yet.
I wanted to try the develop version but could not find any instructions on how to install that.
This should do it:
cd wherever/you/want/it/installed
git clone https://github.com/dahlbyk/posh-git.git
git checkout develop
.\install.ps1
That gives me an error:
PS /Users/felix/git/posh-git> ./install.ps1
Get-AuthenticodeSignature : The term 'Get-AuthenticodeSignature' is not recognized as the name of a cmdlet, function, s
cript file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is cor
rect and try again.
At /Users/felix/git/posh-git/src/Utils.ps1:163 char:16
+ $sig = Get-AuthenticodeSignature $profilePath
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-AuthenticodeSignature:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
The prompt is not duplicated afterwards anymore, but the input is still weird:

I also noticed the added import to my profile uses backslashes:
Import-Module '/Users/felix/git/posh-git/src\posh-git.psd1'
Yeah, we have definitely have more work to do to finish up the cross-platform / PowerShell Core support.
Happy to test any fixes. Really want to get back to Powershell 馃挭
The issue is with PSReadline see - https://github.com/lzybkr/PSReadLine/issues/468. There was a partial fix documented here - https://github.com/PowerShell/PowerShell/pull/3867.
The workaround for now is to add this line to your profile after the import of posh-git (develop branch) e.g.:
Import-Module $Home/GitHub/dahlbyk/posh-git/src/posh-git.psd1
$global:GitPromptSettings.DefaultPromptSuffix = "`n> "
The two keys are use esc seqs instead of Write-Host and for now, you can't have an esc seq on the line with the > char because PSReadline rewrites that char in a different color (red) to indicate syntax errors on the command line.
Also, found and fixed the \ issue. PR coming shortly.
That fixed it, thanks! Looking forward to a proper fix

The proper fix is sitting in this branch - it's at least preview quality, but I don't have custom key bindings working on Linux yet.
FWIW this workaround makes it tolerable on WSL/Bash on Windows 10. There's still this weird cursor movement that happens as you type. :-(
https://github.com/dahlbyk/posh-git/pull/487 has been merged into develop to fix Linux/macOS install issues.
Awesome to see the progress, keep it up :)
When can the fix for this become available in the release? I have been hoping the fix would be released sooner with how it impacts usage. I continue to see the problem.
Using Mac OS 10.12.6 I just installed PowerShell 6.0.0-rc via brew. Used install-module posh-git -scope CurrentUser.
Result is the double prompt and odd behavior on input.
The latest builds of PSReadLine address the double prompt and odd behavior on input, but installing requires replacing files in PowerShell 6.0.0-rc.
Hopefully that won't be necessary for the final release, but no guarantees, my free time doesn't necessarily line up with the PowerShell team's schedule.
@binaryWard If you clone this repo and checkout the develop branch and import the posh-git.psd1 file by its path, posh-git should work better on a Mac. Also add this line to your profile after importing posh-git:
$global:GitPromptSettings.DefaultPromptSuffix = '`n$(''>'' * ($nestedPromptLevel + 1)) '
IIRC the current PSReadline impl behaves better if the prompt char > is on a line by itself.
I'm going to close this since the original issue is really a PSReadLine issue that has been fixed. If you are running PS Core on Linux or macOS, you can install a beta of the 2.0.0 PSReadLine module with the following command:
Install-Module PSReadLine -RequiredVersion 2.0.0-Beta1 -AllowPrerelease -Scope CurrentUser
Getting this error when I'm trying to install it:
PS /Users/felix> Install-Module PSReadLine -RequiredVersion 2.0.0-Beta1 -AllowPrerelease -Scope CurrentUser
Install-Module : Cannot process argument transformation on parameter 'RequiredVersion'. Cannot convert value "2.0.0-Beta1" to type "System.Version". Error: "Input string was not in a correct format."
At line:1 char:44
+ Install-Module PSReadLine -RequiredVersion 2.0.0-Beta1 -AllowPrerelea ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Install-Module], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Install-Module
Sorry, we've not published Beta1 yet. I was hoping you could try it from the GH source. See the instructions I left in #501.
I don't see any instructions for PSReadline in #501?
Doh! Guess I should read these posts more thoroughly before replying. You need to be on PS Core 6.0.0-rc2. That is using a newer version of PowerShellGet (1.6.0) that understands the prerelease versioning.
You can also just update (install) the latest PowerShellGet if you're running Windows PowerShell, probably something like Install-Module -Force -AllowClobber -Scope CurrentUser PowerShellGet.