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

Integrated terminal needs multi-line input support #569

Open
ChrisLynchHPE opened this Issue Mar 16, 2017 · 11 comments

Comments

Projects
None yet
8 participants
@ChrisLynchHPE

ChrisLynchHPE commented Mar 16, 2017

System Details

  • Operating system name and version: Windows 10.15058 (Insiders Fast Ring)
  • VS Code version: 1.10.2
  • PowerShell extension version: 0.10
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.1.15058.0
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15058.0
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

I have a Hashtable in my PowerShell module, and the new terminal in 0.10 does not work correctly like it used to. Paste the following into the Terminal:

$MyHT = @{
   key1 = 'value1';
   key2 = 'value2
}

And you will get the following output:

PS C:\Users\chris> $MyHT = @{
The hash literal was incomplete.
At line:0 char:0
PS C:\Users\chris>    key1 = 'value1';
key1 : The term 'key1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:4
+    key1 = 'value1';
+    ~~~~
    + CategoryInfo          : ObjectNotFound: (key1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\chris>    key2 = 'value2
The string is missing the terminator: '.
At line:0 char:0
PS C:\Users\chris> }

Not only does one get the exceptions above, but the terminal is extremely slow. I don't know if it's because of the loaded PSM1 file I have (which is more than 80k lines, and 2.2MB in size).

Attached Logs

When I enable plugin verbose logging, powershell.exe will terminate and I can't then reproduce the issue:

powershell.exe started --
    pid: 940
    exe: C:\WINDOWS\Sysnative\WindowsPowerShell\v1.0\powershell.exe
    args: C:\Users\chris\.vscode\extensions\ms-vscode.PowerShell-0.10.0\scripts\Start-EditorServices.ps1 -EditorServicesVersion '0.10.0' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '0.10.0' -BundledModulesPath 'C:\Users\chris\.vscode\extensions\ms-vscode.PowerShell-0.10.0\modules' -EnableConsoleRepl -LogLevel 'Verbose' -LogPath 'C:\Users\chris\.vscode\extensions\ms-vscode.PowerShell-0.10.0\logs\1489692702-86da6b33-6d62-41a2-a912-eb66f3cd355a1489692658699\EditorServices.log' -SessionDetailsPath 'C:\Users\chris\.vscode\extensions\ms-vscode.PowerShell-0.10.0\sessions\PSES-VSCode-12712' 



powershell.exe terminated or terminal UI was closed

Could not start language service: 
Timed out waiting for session file to appear.

(the log file generated contains the text I pasted above.)

@daviwil daviwil changed the title from Copy and Paste Hashtable or PSCustomObject with multiple lines into Terminal does not paste literal to Integrated terminal needs multi-line input support Mar 16, 2017

@daviwil

This comment has been minimized.

Show comment
Hide comment
@daviwil

daviwil Mar 16, 2017

Collaborator

Hey Chris, this is happening because I haven't added support for multi-line input. I'll try to get this in for 0.10.2.

Collaborator

daviwil commented Mar 16, 2017

Hey Chris, this is happening because I haven't added support for multi-line input. I'll try to get this in for 0.10.2.

@daviwil daviwil added this to the 0.10.2 milestone Mar 16, 2017

@daviwil daviwil added the Issue-Bug label Mar 16, 2017

@ChrisLynchHPE

This comment has been minimized.

Show comment
Hide comment
@ChrisLynchHPE

ChrisLynchHPE Mar 16, 2017

Ah, okay. Also, any idea on why the powershell process would be so slow on my Surface Pro 3 Core i5/256 system? If I terminate the integrated console or PowerShell session in VSCode, overall performance dramatically improves. I don't have any similar perf issues with PowerShell outside of VSCode.

ChrisLynchHPE commented Mar 16, 2017

Ah, okay. Also, any idea on why the powershell process would be so slow on my Surface Pro 3 Core i5/256 system? If I terminate the integrated console or PowerShell session in VSCode, overall performance dramatically improves. I don't have any similar perf issues with PowerShell outside of VSCode.

@Jaykul

This comment has been minimized.

Show comment
Hide comment
@Jaykul

Jaykul Mar 17, 2017

Multi-line badly needed. Also, text navigation in input, like Ctrl+Left or Ctrl+Shift+Left or Ctrl+A or Ctrl+Backspace ;-)

Jaykul commented Mar 17, 2017

Multi-line badly needed. Also, text navigation in input, like Ctrl+Left or Ctrl+Shift+Left or Ctrl+A or Ctrl+Backspace ;-)

@daviwil

This comment has been minimized.

Show comment
Hide comment
@daviwil

daviwil Mar 17, 2017

Collaborator

I was trying to decide whether I should add text navigation or let PSReadline take care of it once I get that integration working. Since that may take a little while, maybe it's better to get some basic navigation hotkeys working?

Collaborator

daviwil commented Mar 17, 2017

I was trying to decide whether I should add text navigation or let PSReadline take care of it once I get that integration working. Since that may take a little while, maybe it's better to get some basic navigation hotkeys working?

@bgelens

This comment has been minimized.

Show comment
Hide comment
@bgelens

bgelens Mar 17, 2017

Yes please 👍 Heavy user of ctrl+left and ctrl+right myself

bgelens commented Mar 17, 2017

Yes please 👍 Heavy user of ctrl+left and ctrl+right myself

@Jaykul

This comment has been minimized.

Show comment
Hide comment
@Jaykul

Jaykul Mar 18, 2017

If PSReadLine integration was easy, that's obviously very nice ;-) But basic multi-line and text editor cursor movement keys would go a long way toward making a long wait comfortable ;-)

Jaykul commented Mar 18, 2017

If PSReadLine integration was easy, that's obviously very nice ;-) But basic multi-line and text editor cursor movement keys would go a long way toward making a long wait comfortable ;-)

@daviwil daviwil modified the milestones: 0.12.0, 0.10.2 Mar 23, 2017

@daviwil daviwil modified the milestones: 0.12.0, Next Patch Update, Next Feature Update Apr 4, 2017

@daviwil daviwil modified the milestones: April 2017, May 2017 May 8, 2017

@daviwil daviwil modified the milestones: May 2017, June 2017 Jun 1, 2017

@daviwil daviwil removed this from the June 2017 milestone Jul 11, 2017

@benpiper

This comment has been minimized.

Show comment
Hide comment
@benpiper

benpiper Aug 15, 2017

Please make it so!

benpiper commented Aug 15, 2017

Please make it so!

@daviwil daviwil modified the milestones: July 2017, Future Oct 26, 2017

@el-chazmo

This comment has been minimized.

Show comment
Hide comment
@el-chazmo

el-chazmo Dec 13, 2017

This still doesn't work in v1.18.1 Is this in the timeline?

el-chazmo commented Dec 13, 2017

This still doesn't work in v1.18.1 Is this in the timeline?

@tylerl0706

This comment has been minimized.

Show comment
Hide comment
@tylerl0706

tylerl0706 Dec 13, 2017

Collaborator

@el-chazmo thanks for your patience! This will be fixed when the Integrated Terminal supports PSReadline. @SeeminglyScience has been working hard on adding it. I don't have a timeline but he might be able to supply one. Or to supply an update.

Collaborator

tylerl0706 commented Dec 13, 2017

@el-chazmo thanks for your patience! This will be fixed when the Integrated Terminal supports PSReadline. @SeeminglyScience has been working hard on adding it. I don't have a timeline but he might be able to supply one. Or to supply an update.

@Jaykul

This comment has been minimized.

Show comment
Hide comment
@Jaykul

Jaykul Jul 10, 2018

+Label AintGonnaDoIt☹️

Can we agree that after supposedly trying to get PSReadLine integrated for over a year, it's long past time to improve your own input? I mean: how many people actually type in that console, the way it is?

Nobody on my team will use the interactive debugger, because working in that terminal is frustrating.

Jaykul commented Jul 10, 2018

+Label AintGonnaDoIt☹️

Can we agree that after supposedly trying to get PSReadLine integrated for over a year, it's long past time to improve your own input? I mean: how many people actually type in that console, the way it is?

Nobody on my team will use the interactive debugger, because working in that terminal is frustrating.

@SeeminglyScience

This comment has been minimized.

Show comment
Hide comment
@SeeminglyScience

SeeminglyScience Jul 10, 2018

Collaborator

@Jaykul It's mostly done, PR is PowerShell/PowerShellEditorServices#672 if you want to try it out 😀

Collaborator

SeeminglyScience commented Jul 10, 2018

@Jaykul It's mostly done, PR is PowerShell/PowerShellEditorServices#672 if you want to try it out 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment