From 2ffa13756005cd8bc380c2fa11693c1f83f8d7d6 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Fri, 28 Jan 2022 21:48:10 +0100 Subject: [PATCH] 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. --- src/init/starship.elv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init/starship.elv b/src/init/starship.elv index 69d5adf71165..e73bbcc51d07 100644 --- a/src/init/starship.elv +++ b/src/init/starship.elv @@ -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 }