vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Enable PSReadline support in the integrated console (syntax highlighting, keyboard navigation)

Open daviwil opened this issue 9 years ago • 133 comments

PSReadline is not supported in the integrated console at this time. A non-trivial amount of work is needed to make PowerShell Editor Services and PSReadline play nicely together so this could take some time.

Features this will enable:

  • Ctrl+Arrow keys, etc (keyboard navigation of the input line)
  • Syntax highlighting of input text
  • Multi-line text input (writing a function definition in the console across multiple lines)

daviwil avatar Mar 14 '17 14:03 daviwil

i was going to request this yesterday but i got distracted.

dotps1 avatar Mar 14 '17 14:03 dotps1

Thank you!

cobdev avatar Mar 17 '17 22:03 cobdev

Hopefully this will include PSReadline's Vi EditMode and ViModeIndicator. I found this issue while searching for a way to get vi mode working.

Liquidmantis avatar Jun 20 '17 17:06 Liquidmantis

Um, @daviwil, when did PSReadline start working in the VSCode PowerShell terminal window? I just opened the terminal and noticed my PSReadline history was available. A quick Set-PSReadlineOption -EditMode Vi and I'm in hog heaven!

Is there something I should be watching for? I guess I should mention: Windows 10 Anniversary Update, PowerShell 5.1, VSCode 1.13.1, PowerShell addin 1.4.1...

gwojan avatar Jul 04 '17 22:07 gwojan

PSReadline support in the PowerShell terminal is a VSCode feature. What isn't implemented yet is PSReadline support in the PowerShell Integrated Console.

rkeithhill avatar Jul 04 '17 23:07 rkeithhill

Hey Greg, unfortunately you're just seeing PSReadLine work inside of plain powershell.exe in the integrated terminal. As Keith mentions, it doesn't currently work in the PowerShell Integrated Console yet. I've started working on that last week though so I expect to have some progress soon!

daviwil avatar Jul 05 '17 13:07 daviwil

Thanks @daviwil and @rkeithhill! I guess I need to start playing with the Integrated Console because I'm sure I knew it was there. It will be great to have PSReadline support because that one particular feature is why I abandoned the ISE a long time ago. I'm such a lousy typist I need all the help I can get. ;-)

gwojan avatar Jul 05 '17 13:07 gwojan

@daviwil any update on this killer feature? ;)

DarkLite1 avatar Jul 17 '17 07:07 DarkLite1

Will this also make it so Clear-Host actually clears the terminal window and doesn't just move the input line to the top of the screen?

1trevor avatar Aug 23 '17 14:08 1trevor

Hi!! @daviwil,

Any update on this enhancement ? It sure is one of the few things that keeps me going back to ISE or the powershell console from time to time.

On a sidenote... I really hope this great project is not put on hold.. cause it seems that there's less and less activity in the repo.

Thanks for all the work!

djobin avatar Oct 16 '17 19:10 djobin

@djobin agree, see #31555

DarkLite1 avatar Oct 17 '17 06:10 DarkLite1

Just adding a 'me too'.

As far as I can tell, this is the feature needed to allow for shelving of ISE for VScode. I love the GIT integration in VScode, but the crippled debug is a show stopper.

I'm guessing that the PSReadLine support may fix the $host.PrivateData issue also? (it contains terminal color values, just not in the integrated console)

moymike avatar Jan 29 '18 17:01 moymike

It's coming. Still some kinks left, but it's coming.

PSReadLine

I'm guessing that the PSReadLine support may fix the $host.PrivateData issue also? (it contains terminal color values, just not in the integrated console)

Definitely not related. I didn't get a chance to look at it this weekend but we'll get it fixed for sure :)

SeeminglyScience avatar Jan 29 '18 22:01 SeeminglyScience

omg that looks awesome @SeeminglyScience, I'm so pumped 🎉

TylerLeonhardt avatar Jan 29 '18 22:01 TylerLeonhardt

Looks great @SeeminglyScience! I'm ready to ditch ISE :)

ghost avatar Feb 06 '18 21:02 ghost

Found this while trying to get syntax highlighting working in the integrated console. I look forward to this being available! Great work!

rfletche847 avatar Feb 09 '18 14:02 rfletche847

@SeeminglyScience Any ETA for seeing this in Insiders? This is the final piece to having a comfortable single pane workflow and not need to set up a side-by-side ConEmu instance.

Thanks for the work!

Liquidmantis avatar Feb 09 '18 16:02 Liquidmantis

@Liquidmantis I'm thinking I can get a solid build of it behind a feature flag not next release but the one after. No promises as I'm a little short on free time atm, but that's the goal :)

SeeminglyScience avatar Feb 09 '18 20:02 SeeminglyScience

@SeeminglyScience that's great to hear! can't wait to finally have PSReadline support, thanks

vrdse avatar Mar 01 '18 18:03 vrdse

I got it working, all you do is import the module ;) Read the install instructions for PowerShellGallery, it's fairly straightforward.

https://github.com/lzybkr/PSReadLine

darkquake93 avatar Mar 04 '18 15:03 darkquake93