mirror of
https://github.com/starship/starship.git
synced 2024-12-23 23:58:51 +01:00
fix(powershell): Fix prompt not updating on -nix systems (#728)
Closes #661
This commit is contained in:
parent
d71373b265
commit
b2ebd24506
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user