File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/PowerShellEditorServices/Services/PowerShellContext/Session Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -24,21 +24,13 @@ internal class PSReadLinePromptContext : IPromptContext
2424 ".." ,
2525 "PSReadLine" ) ;
2626
27+ // TODO: Does this have to be done in an inline script?
2728 private static readonly string ReadLineInitScript = $@ "
2829 [System.Diagnostics.DebuggerHidden()]
2930 [System.Diagnostics.DebuggerStepThrough()]
3031 param()
3132 end {{
32- $module = Get-Module -ListAvailable PSReadLine |
33- Where-Object {{ $_.Version -ge '2.0.2' }} |
34- Sort-Object -Descending Version |
35- Select-Object -First 1
36- if (-not $module) {{
37- Import-Module '{ _psReadLineModulePath . Replace ( "'" , "''" ) } '
38- return [Microsoft.PowerShell.PSConsoleReadLine]
39- }}
40-
41- Import-Module -ModuleInfo $module
33+ Import-Module '{ _psReadLineModulePath . Replace ( "'" , "''" ) } '
4234 return [Microsoft.PowerShell.PSConsoleReadLine]
4335 }}" ;
4436
You can’t perform that action at this time.
0 commit comments