From c0c3a7274a18dbfb67bbc0b516bbccc7085b803c Mon Sep 17 00:00:00 2001 From: mdgrs <81177095+mdgrs-mei@users.noreply.github.com> Date: Fri, 2 Jan 2026 21:25:47 +0900 Subject: [PATCH] Remove CommandLine length limit from history entries - The limit did not have good reason, words after the length limit 128 should also hit --- module/PowerShellRun/Private/PSReadLineHistory.ps1 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/module/PowerShellRun/Private/PSReadLineHistory.ps1 b/module/PowerShellRun/Private/PSReadLineHistory.ps1 index 243c3a2..8b7c484 100644 --- a/module/PowerShellRun/Private/PSReadLineHistory.ps1 +++ b/module/PowerShellRun/Private/PSReadLineHistory.ps1 @@ -16,17 +16,12 @@ function SearchPSReadLineHistory() { $historySet = [System.Collections.Generic.Hashset[string]]::new([System.StringComparer]::OrdinalIgnoreCase) $entries = [System.Collections.Generic.List[PowerShellRun.SelectorEntry]]::new() - $maxNameLength = 128 foreach ($item in $historyItems) { $isAdded = $historySet.Add($item.CommandLine) if ($isAdded) { $entry = [PowerShellRun.SelectorEntry]::new() $entry.UserData = $item - $entry.Name = if ($item.CommandLine.Length -gt $maxNameLength) { - $item.CommandLine.Substring(0, $maxNameLength) - } else { - $item.CommandLine - } + $entry.Name = $item.CommandLine $startTime = if ($item.StartTime -ne [DateTime]::MinValue) { $localTime = $item.StartTime.ToLocalTime()