From 5f4f5f9877fe5c6f07d6d2f8fcb779821c51fc9a Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 10 Jun 2024 07:31:07 +0100 Subject: [PATCH] Make comands red in PowerShell --- roles/home-cli/files/Microsoft.PowerShell_profile.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 b/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 index f09b742..cc36b91 100644 --- a/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 +++ b/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 @@ -94,9 +94,10 @@ Remove-Variable -Name nvim # Force UTF-8 output. $OutputEncoding = [System.Text.Encoding]::UTF8 -Set-PSReadlineOption -BellStyle None -Set-PSReadlineOption -EditMode Emacs -Set-PSReadlineKeyHandler -Key Tab -Function Complete +Set-PSReadLineOption -BellStyle None +Set-PSReadLineOption -Color @{Command = 'Red'} +Set-PSReadLineOption -EditMode Emacs +Set-PSReadLineKeyHandler -Key Tab -Function Complete Set-PSReadLineKeyHandler -Key UpArrow -ScriptBlock { [Microsoft.PowerShell.PSConsoleReadLine]::HistorySearchBackward() [Microsoft.PowerShell.PSConsoleReadLine]::EndOfLine()