1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-09-21 18:39:00 +00:00

fix(elvish): use $pwd for logical-path (#3534)

The `$PWD` environment variable used by starship is not updated on startup by `elvish`. `elvish` also provides a separate `$pwd` variable that does get updated and seems to be be a better indicator for the current logical path.
This commit is contained in:
David Knaack 2022-01-28 21:48:10 +01:00 committed by GitHub
parent b99d3b8e24
commit 6ca911b9fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,10 +24,10 @@ set edit:after-command = [ $@edit:after-command $starship-after-command-hook~ ]
# Install starship # Install starship
set edit:prompt = { set edit:prompt = {
var cmd-duration = (printf "%.0f" (* $edit:command-duration 1000)) var cmd-duration = (printf "%.0f" (* $edit:command-duration 1000))
::STARSHIP:: prompt --jobs=$num-bg-jobs --cmd-duration=$cmd-duration --status $cmd-status-code ::STARSHIP:: prompt --jobs=$num-bg-jobs --cmd-duration=$cmd-duration --status=$cmd-status-code --logical-path=$pwd
} }
set edit:rprompt = { set edit:rprompt = {
var cmd-duration = (printf "%.0f" (* $edit:command-duration 1000)) var cmd-duration = (printf "%.0f" (* $edit:command-duration 1000))
::STARSHIP:: prompt --right --jobs=$num-bg-jobs --cmd-duration=$cmd-duration --status $cmd-status-code ::STARSHIP:: prompt --right --jobs=$num-bg-jobs --cmd-duration=$cmd-duration --status=$cmd-status-code --logical-path=$pwd
} }