Fish integration: Have the value of $status preserved by the prompt functions
This commit is contained in:
parent
075b4d252a
commit
72e15d8b4f
@ -49,17 +49,21 @@ function _ksi_main
|
|||||||
end
|
end
|
||||||
|
|
||||||
function _ksi_start_prompt
|
function _ksi_start_prompt
|
||||||
|
set --local cmd_status "$status"
|
||||||
if test "$_ksi_prompt_state" != "postexec" -a "$_ksi_prompt_state" != "first-run"
|
if test "$_ksi_prompt_state" != "postexec" -a "$_ksi_prompt_state" != "first-run"
|
||||||
_ksi_mark "D"
|
_ksi_mark "D"
|
||||||
end
|
end
|
||||||
set --global _ksi_prompt_state "prompt_start"
|
set --global _ksi_prompt_state "prompt_start"
|
||||||
_ksi_mark "A"
|
_ksi_mark "A"
|
||||||
|
return "$cmd_status" # preserve the value of $status
|
||||||
end
|
end
|
||||||
|
|
||||||
function _ksi_end_prompt
|
function _ksi_end_prompt
|
||||||
|
set --local cmd_status "$status"
|
||||||
_ksi_original_fish_prompt
|
_ksi_original_fish_prompt
|
||||||
set --global _ksi_prompt_state "prompt_end"
|
set --global _ksi_prompt_state "prompt_end"
|
||||||
_ksi_mark "B"
|
_ksi_mark "B"
|
||||||
|
return "$cmd_status" # preserve the value of $status
|
||||||
end
|
end
|
||||||
|
|
||||||
functions -c fish_prompt _ksi_original_fish_prompt
|
functions -c fish_prompt _ksi_original_fish_prompt
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user