diff --git a/src/cache/cache.go b/src/cache/cache.go index 7990375b..9eaf5c9c 100644 --- a/src/cache/cache.go +++ b/src/cache/cache.go @@ -5,6 +5,8 @@ import ( "os" "strconv" "time" + + "github.com/jandedobbeleer/oh-my-posh/src/log" ) type Cache interface { @@ -30,8 +32,10 @@ var SessionFileName = fmt.Sprintf("%s.%s", FileName, pid()) func pid() string { pid := os.Getenv("POSH_PID") if len(pid) == 0 { + log.Debug("POSH_PID not set, using process pid") pid = strconv.Itoa(os.Getppid()) } + return pid } diff --git a/src/shell/scripts/omp.fish b/src/shell/scripts/omp.fish index 27fdcb53..c7745414 100644 --- a/src/shell/scripts/omp.fish +++ b/src/shell/scripts/omp.fish @@ -1,8 +1,8 @@ -set --export POSH_THEME ::CONFIG:: -set --export POSH_SHELL_VERSION $FISH_VERSION -set --global POWERLINE_COMMAND oh-my-posh -set --global POSH_PID $fish_pid -set --global CONDA_PROMPT_MODIFIER false +set --global --export POSH_THEME ::CONFIG:: +set --global --export POSH_SHELL_VERSION $FISH_VERSION +set --global --export POWERLINE_COMMAND oh-my-posh +set --global --export POSH_PID $fish_pid +set --global --export CONDA_PROMPT_MODIFIER false set --global _omp_tooltip_command '' set --global _omp_current_rprompt '' set --global _omp_transient false