@@ -4,17 +4,32 @@ Before submitting your bug report, please check for duplicates, and +1 the dupli
4
4
There are a few common issues that are commonly reported.
5
5
6
6
If there is an exception copying to/from the clipboard, it's probably the same as https://github.com/PowerShell/PSReadLine/issues/265
7
-
8
7
If there is an exception shortly after resizing the console, it's probably the same as https://github.com/PowerShell/PSReadLine/issues/292
9
8
-->
10
9
11
10
Environment data
12
11
----------------
13
12
14
- <!-- provide the output of the following:
15
- ```powershell
13
+ <!--
14
+
15
+ The following script will generate the environment data that helps triage and investigate the issue.
16
+ Please run the script in the PowerShell session where you ran into the issue and provide the output here.
17
+
16
18
& {
17
- "PS version: $($PSVersionTable.PSVersion)"
19
+ $hostName = $Host.Name
20
+ if ($hostName -eq "ConsoleHost" -and (Get-Command Get-CimInstance -ErrorAction SilentlyContinue)) {
21
+ $id = $PID
22
+ $inWindowsTerminal = $false
23
+ while ($true) {
24
+ $p = Get-CimInstance -ClassName Win32_Process -Filter "ProcessId Like $id"
25
+ if (!$p -or !$p.Name) { break }
26
+ if ($p.Name -eq "WindowsTerminal.exe") { $inWindowsTerminal = $true; break }
27
+ $id = $p.ParentProcessId
28
+ }
29
+ if ($inWindowsTerminal) { $hostName += " (Windows Terminal)" }
30
+ }
31
+
32
+ "`nPS version: $($PSVersionTable.PSVersion)"
18
33
$v = (Get-Module PSReadline).Version
19
34
$m = Get-Content "$(Split-Path -Parent (Get-Module PSReadLine).Path)\PSReadLine.psd1" | Select-String "Prerelease = '(.*)'"
20
35
if ($m) {
@@ -27,10 +42,11 @@ Environment data
27
42
"os: $((dir $env:SystemRoot\System32\cmd.exe).VersionInfo.FileVersion)"
28
43
}
29
44
"PS file version: $($name = if ($PSVersionTable.PSEdition -eq "Core") { "pwsh.dll" } else { "powershell.exe" }; (dir $pshome\$name).VersionInfo.FileVersion)"
45
+ "HostName: $hostName"
30
46
"BufferWidth: $([console]::BufferWidth)"
31
- "BufferHeight: $([console]::BufferHeight)"
47
+ "BufferHeight: $([console]::BufferHeight)`n "
32
48
}
33
- ```
49
+
34
50
-->
35
51
36
52
Steps to reproduce or exception report
0 commit comments