From a5aa7d9f2abe02fd43dbb4f578744b79bd9b7042 Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Sat, 19 Oct 2019 17:47:34 -0600 Subject: [PATCH] Shorten window title text to limit tab width in Windows Terminal Most terminals on macOS/Linux are likely to be 64-bit, same on Windows. So only display 32-bit when runnign in 32-bit PowerShell. Also, only display PS Major.Minor version info. --- src/PoshGitTypes.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PoshGitTypes.ps1 b/src/PoshGitTypes.ps1 index 5e7c8cb3e..6dc0a1f12 100644 --- a/src/PoshGitTypes.ps1 +++ b/src/PoshGitTypes.ps1 @@ -274,7 +274,7 @@ class PoshGitPromptSettings { [string[]]$RepositoriesInWhichToDisableFileStatus = @() [string]$DescribeStyle = '' - [psobject]$WindowTitle = {param($GitStatus, [bool]$IsAdmin) "$(if ($IsAdmin) {'Admin: '})$(if ($GitStatus) {"$($GitStatus.RepoName) [$($GitStatus.Branch)]"} else {Get-PromptPath}) ~ PowerShell $($PSVersionTable.PSVersion) $([IntPtr]::Size * 8)-bit ($PID)"} + [psobject]$WindowTitle = {param($GitStatus, [bool]$IsAdmin) "$(if ($IsAdmin) {'Admin: '})$(if ($GitStatus) {"$($GitStatus.RepoName) [$($GitStatus.Branch)]"} else {Get-PromptPath}) ~ PowerShell $($PSVersionTable.PSVersion.Major).$($PSVersionTable.PSVersion.Minor) $(if ([IntPtr]::Size -eq 4) {'32-bit '})($PID)"} [PoshGitTextSpan]$DefaultPromptPrefix = '$(Get-PromptConnectionInfo -Format "[{1}@{0}]: ")' [PoshGitTextSpan]$DefaultPromptPath = '$(Get-PromptPath)'