fix(pwsh): run command once on module import

This commit is contained in:
Jan De Dobbeleer 2020-09-20 08:53:54 +02:00 committed by Jan De Dobbeleer
parent 18746bdc4b
commit 87325c5a05

View file

@ -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 {