Skip to content

Commit

Permalink
fix(powershell): Fix prompt not updating on -nix systems (starship#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkna authored and matchai committed Dec 13, 2019
1 parent d71373b commit b2ebd24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/init/starship.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ function global:prompt {
if ($lastCmd = Get-History -Count 1) {
$duration = [math]::Round(($lastCmd.EndExecutionTime - $lastCmd.StartExecutionTime).TotalSeconds)
# & ensures the path is interpreted as something to execute
$out = @(&::STARSHIP:: prompt --status=$lastexitcode --jobs=$jobs --cmd-duration=$duration)
$out = @(&::STARSHIP:: prompt "--path=$PWD" --status=$lastexitcode --jobs=$jobs --cmd-duration=$duration)
} else {
$out = @(&::STARSHIP:: prompt --status=$lastexitcode --jobs=$jobs)
$out = @(&::STARSHIP:: prompt "--path=$PWD" --status=$lastexitcode --jobs=$jobs)
}

# Convert stdout (array of lines) to expected return type string
Expand Down

0 comments on commit b2ebd24

Please sign in to comment.