Multi-line prompt incorrectly displayes the last line with PSReadLine
See original GitHub issueFrom @vors on July 3, 2016 5:16
Steps to reproduce
function prompt
{
"PS $pwd`n Hello`n World>"
}
Type ‘foo’ with the new prompt
Expected behavior
PS /Users/vors/dev/PowerShell/src
Hello
World>foo
Actual behavior
PS /Users/vors/dev/PowerShell/src
Hello
PS /Usefoo
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.10032.0
PSEdition Linux
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v0.5.0-257-g07501f1d3a02c4e70da8a2693e3d0f833a61cf65
CLRVersion
WSManStackVersion 1.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Copied from original issue: PowerShell/PowerShell#1269
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Multi-line prompt incorrectly displayes the last ...
Multi-line prompt incorrectly displayes the last line with PSReadLine. ... function prompt { "PS $pwd`n Hello`n World>" }. Type 'foo' with the new...
Read more >about PSReadLine Functions - PowerShell
Attempt to execute the current input. If the current input is incomplete (for example there's a missing closing parenthesis, bracket, or quote) ...
Read more >PSReadLine – A free PowerShell console extension
SHIFT+ENTER opens a new line with a continuation prompt at the beginning. In PowerShell, you can do this with the backtick (`); however,...
Read more >Getting powershell current line before ENTER is pressed
Workaround for a display bug: If the cursor isn't at the very end of the line, everything to the # !! right is...
Read more >PowerShell Code Breaks: Break Line, Not Code
I have a problem sometimes when I copy code from the Hey, Scripting Guy! Blog. It does not seem to work. I try...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe this is fixed in #561.
I’ll publish a pre-release version to the PowerShell Gallery as soon as they support pre-releases.
If you’d like to try a fix before that, you can build the lastest yourself from the master branch, or grab a build from AppVeyor like this one.
Note the version number is now 2.0, so be sure to copy the contents to <your module dir>\PSReadLine\2.0.
Please open a new issue - this one was more general.
I’m a little surprised I didn’t notice, I added the option for myself and I do use
Ctrl+L
.