Skip to content

Commit

Permalink
fix(pwsh): run command once on module import
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Sep 20, 2020
1 parent 18746bd commit 87325c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/powershell/go-my-posh/go-my-posh.psm1
Expand Up @@ -26,6 +26,9 @@ if (!$IsWindows) {
if ($IsWindows) {
# When this is not set, outputted fonts aren't rendered correctly in some terminals for the prompt function
[console]::OutputEncoding = New-Object System.Text.UTF8Encoding
# Not running it beforehand in the terminal will fail the prompt somehow
$poshCommand = Get-PoshCommand
Invoke-Expression -Command $poshCommand | Out-Null
}

function Set-PoshPrompt {
Expand Down

0 comments on commit 87325c5

Please sign in to comment.