mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-19 11:35:16 +00: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) {
|
if ($lastCmd = Get-History -Count 1) {
|
||||||
$duration = [math]::Round(($lastCmd.EndExecutionTime - $lastCmd.StartExecutionTime).TotalSeconds)
|
$duration = [math]::Round(($lastCmd.EndExecutionTime - $lastCmd.StartExecutionTime).TotalSeconds)
|
||||||
# & ensures the path is interpreted as something to execute
|
# & 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 {
|
} 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
|
# Convert stdout (array of lines) to expected return type string
|
||||||
|
Loading…
Reference in New Issue
Block a user