PowerShell / PowerShellEditorServices

A common platform for PowerShell development support in any editor or application!
MIT License
612 stars 207 forks source link

Use a provided shell integration script directly #2156

Closed andyleejordan closed 3 months ago

andyleejordan commented 3 months ago

Instead of having to maintain an edited copy (which was really annoying) I stubbed out PSConsoleHostReadLine to do what's expected. So now we can just use the existing shell integration script directly!

Since we can't reliably find the script using code --locate-shell-integration-path pwsh we now rely on it being sent by the client on initialization. Its presence implies the feature is on.

This is pretty VS Code specific, but not necessarily so.

andyleejordan commented 3 months ago

This was prompted by a) being annoyed at having to keep doing this and b) the changes in https://github.com/microsoft/vscode/commit/d60e424ff398a41f5e65827ec6e06b235273e019 being much more difficult to incorporate except by doing it this way! /cc @Tyriar