question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-line prompt incorrectly displayes the last line with PSReadLine

See original GitHub issue

From @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:closed
  • Created 7 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
lzybkrcommented, Oct 17, 2017

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.

0reactions
lzybkrcommented, Feb 16, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found