mirror of
https://github.com/Llewellynvdm/starship.git
synced 2025-02-03 04:28:35 +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:
parent
b99d3b8e24
commit
6ca911b9fe
@ -24,10 +24,10 @@ set edit:after-command = [ $@edit:after-command $starship-after-command-hook~ ]
|
||||
# Install starship
|
||||
set edit:prompt = {
|
||||
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 = {
|
||||
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user