2019-09-11 00:31:08 +00: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 22:38:06 +00:00
|
|
|
set -l starship_duration "$CMD_DURATION$cmd_duration"
|
2019-09-25 08:13:58 +00:00
|
|
|
::STARSHIP:: prompt --status=$exit_code --keymap=$keymap --cmd-duration=$starship_duration --jobs=(count (jobs -p))
|
2019-09-11 00:31:08 +00:00
|
|
|
end
|
2019-10-25 12:41:01 +00:00
|
|
|
|
|
|
|
# disable virtualenv prompt, it breaks starship
|
|
|
|
set VIRTUAL_ENV_DISABLE_PROMPT 1
|
|
|
|
|
2019-09-11 00:31:08 +00:00
|
|
|
function fish_mode_prompt; end
|
|
|
|
export STARSHIP_SHELL="fish"
|
2020-09-28 20:38:50 +00:00
|
|
|
|
|
|
|
# Set up the session key that will be used to store logs
|
2021-01-04 17:36:50 +00:00
|
|
|
export STARSHIP_SESSION_KEY=(random 10000000000000 9999999999999999)
|