fix: Modules not working in fish RPROMPT (#3146)
This should fix some modules not working correctly in the fish `RPROMPT`. I have done this the very naive way by simply duplicating the code that is currently in the `fish_prompt` function to avoid having to change the scope of any of the variables (currently all local).
This commit is contained in:
parent
425af13026
commit
c682329bd0
|
@ -13,6 +13,16 @@ function fish_prompt
|
|||
end
|
||||
|
||||
function fish_right_prompt
|
||||
switch "$fish_key_bindings"
|
||||
case fish_hybrid_key_bindings fish_vi_key_bindings
|
||||
set STARSHIP_KEYMAP "$fish_bind_mode"
|
||||
case '*'
|
||||
set STARSHIP_KEYMAP insert
|
||||
end
|
||||
set STARSHIP_CMD_STATUS $status
|
||||
# Account for changes in variable name between v2.7 and v3.0
|
||||
set STARSHIP_DURATION "$CMD_DURATION$cmd_duration"
|
||||
set STARSHIP_JOBS (count (jobs -p))
|
||||
::STARSHIP:: prompt --right --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus=$pipestatus --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue