2020-05-19 06:03:25 +03:00
|
|
|
function fake_tide_right_prompt
|
2020-05-19 02:17:50 +03:00
|
|
|
set -l splitText (string split '\n' (_fetch_right_prompt_items))
|
|
|
|
set -l printAtEndedRightPromptHeight (count $splitText)
|
|
|
|
|
|
|
|
for thing in $splitText
|
|
|
|
_print_at_end $thing
|
|
|
|
end
|
|
|
|
|
|
|
|
_cursor_up $printAtEndedRightPromptHeight
|
|
|
|
end
|
|
|
|
|
|
|
|
function _fetch_right_prompt_items
|
|
|
|
printf '%s' ' '
|
|
|
|
|
2020-05-19 06:03:25 +03:00
|
|
|
for item in fake_tide_{$fake_tide_right_prompt_items}
|
2020-05-19 02:17:50 +03:00
|
|
|
set -l itemOutput (_$item)
|
|
|
|
printf '%s' "$itemOutput"
|
|
|
|
|
|
|
|
set_color normal
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function _print_at_end -a text
|
2020-05-20 20:05:33 +03:00
|
|
|
set -l startLocation (math $fake_columns -(string length (_tide_decolor $text)))
|
2020-05-19 02:17:50 +03:00
|
|
|
_cursor_right $startLocation
|
|
|
|
printf '%s' $text
|
|
|
|
|
|
|
|
printf '%b' '\v'
|
|
|
|
printf '%b' '\r'
|
|
|
|
end
|