2019-09-11 02:31:08 +02:00
|
|
|
function fish_prompt
|
|
|
|
switch "$fish_key_bindings"
|
|
|
|
case fish_hybrid_key_bindings fish_vi_key_bindings
|
|
|
|
set keymap "$fish_bind_mode"
|
|
|
|
case '*'
|
|
|
|
set keymap insert
|
|
|
|
end
|
|
|
|
set -l exit_code $status
|
|
|
|
# Account for changes in variable name between v2.7 and v3.0
|
2019-12-19 23:38:06 +01:00
|
|
|
set -l starship_duration "$CMD_DURATION$cmd_duration"
|
2019-09-25 10:13:58 +02:00
|
|
|
::STARSHIP:: prompt --status=$exit_code --keymap=$keymap --cmd-duration=$starship_duration --jobs=(count (jobs -p))
|
2019-09-11 02:31:08 +02:00
|
|
|
end
|
2019-10-25 14:41:01 +02:00
|
|
|
|
|
|
|
# disable virtualenv prompt, it breaks starship
|
|
|
|
set VIRTUAL_ENV_DISABLE_PROMPT 1
|
|
|
|
|
2019-09-11 02:31:08 +02:00
|
|
|
function fish_mode_prompt; end
|
2021-02-15 20:10:08 +01:00
|
|
|
set -gx STARSHIP_SHELL "fish"
|
2020-09-28 22:38:50 +02:00
|
|
|
|
|
|
|
# Set up the session key that will be used to store logs
|
2021-02-15 20:10:08 +01:00
|
|
|
set -gx STARSHIP_SESSION_KEY (random 10000000000000 9999999999999999)
|