diff --git a/src/init/starship.fish b/src/init/starship.fish index 595e16b33..a5716d3bd 100644 --- a/src/init/starship.fish +++ b/src/init/starship.fish @@ -1,20 +1,22 @@ function fish_prompt switch "$fish_key_bindings" case fish_hybrid_key_bindings fish_vi_key_bindings - set keymap "$fish_bind_mode" + set STARSHIP_KEYMAP "$fish_bind_mode" case '*' - set keymap insert + set STARSHIP_KEYMAP insert end - set -l exit_code $status + set STARSHIP_CMD_STATUS $status # Account for changes in variable name between v2.7 and v3.0 - set -l starship_duration "$CMD_DURATION$cmd_duration" - ::STARSHIP:: prompt --status=$exit_code --keymap=$keymap --cmd-duration=$starship_duration --jobs=(count (jobs -p)) + set STARSHIP_DURATION "$CMD_DURATION$cmd_duration" + ::STARSHIP:: prompt --status=$STARSHIP_CMD_STATUS --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=(count (jobs -p)) end -# disable virtualenv prompt, it breaks starship -set VIRTUAL_ENV_DISABLE_PROMPT 1 +# Disable virtualenv prompt, it breaks starship +set -g VIRTUAL_ENV_DISABLE_PROMPT 1 + +# Remove default mode prompt +builtin functions -e fish_mode_prompt -function fish_mode_prompt; end set -gx STARSHIP_SHELL "fish" # Set up the session key that will be used to store logs