Fish shell integration: Strip trailing newlines from the original fish prompt as fish does this

This commit is contained in:
Kovid Goyal 2021-09-15 16:57:30 +05:30
parent 5c1dd69963
commit a073936997
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -60,7 +60,8 @@ function _ksi_main
function _ksi_end_prompt function _ksi_end_prompt
set --local cmd_status "$status" set --local cmd_status "$status"
_ksi_original_fish_prompt set --local op (_ksi_original_fish_prompt) # trim trailing newlines to mimic fish behavior
printf "%s" "$op"
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 return "$cmd_status" # preserve the value of $status