diff options
author | claw0ry <me@claw0ry.net> | 2024-12-20 14:56:25 +0100 |
---|---|---|
committer | claw0ry <me@claw0ry.net> | 2024-12-20 14:58:38 +0100 |
commit | 8e0315d3f2dd566623799e531586237d49ba1546 (patch) | |
tree | 28f59e64e776aedc88e07527a10c08be4941a771 | |
parent | bashrc: fix bash prompt breaking (diff) |
powershell: fix custom prompt
-rw-r--r-- | powershell/Microsoft.PowerShell_profile.ps1 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/powershell/Microsoft.PowerShell_profile.ps1 b/powershell/Microsoft.PowerShell_profile.ps1 index 7f247ec..35c0cf9 100644 --- a/powershell/Microsoft.PowerShell_profile.ps1 +++ b/powershell/Microsoft.PowerShell_profile.ps1 @@ -24,9 +24,9 @@ if (Get-Command 'oh-my-posh' -ErrorAction 'SilentlyContinue') { function prompt { $git_branch = $(git branch --show-current 2>/dev/null) if ($git_branch -ne $null -and $git_branch -ne "") { - $git_branch = "($($git_branch))" + $git_branch = " ($($git_branch))" } - "[pwsh] `e[01;32m$($env:USER)@$([System.Net.Dns]::GetHostName())`e[00m:`e[01;34m$(Split-Path -Path $pwd -Leaf) $git_branch`e[00m`$ " + "[pwsh] `e[01;32m$($env:USER)@$([System.Net.Dns]::GetHostName())`e[00m:`e[01;34m$(Split-Path -Path $pwd -Leaf)`e[1;35m$git_branch`e[00m`$ " } } |