File tree 1 file changed +2
-10
lines changed
src/PowerShellEditorServices/Services/PowerShellContext/Session
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
24
24
".." ,
25
25
"PSReadLine" ) ;
26
26
27
+ # TODO : Does this have to be done in an inline script?
27
28
private static readonly string ReadLineInitScript = $@ "
28
29
[System.Diagnostics.DebuggerHidden()]
29
30
[System.Diagnostics.DebuggerStepThrough()]
30
31
param()
31
32
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 ( "'" , "''" ) } '
42
34
return [Microsoft.PowerShell.PSConsoleReadLine]
43
35
}}" ;
44
36
You can’t perform that action at this time.
0 commit comments