2020-05-04 07:41:08 +03:00
|
|
|
|
# Created by lean configure
|
2020-04-21 22:15:05 +03:00
|
|
|
|
function fish_prompt --description 'Write out the prompt'
|
2020-04-29 22:32:59 +03:00
|
|
|
|
set -g last_pipestatus $pipestatus
|
|
|
|
|
set -g last_status $status
|
2020-04-21 22:15:05 +03:00
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
set_color $lean_prompt_connection_color
|
2020-04-29 07:19:32 +03:00
|
|
|
|
printf "%.s$lean_prompt_connection_icon" (seq $COLUMNS)
|
2020-04-21 22:15:05 +03:00
|
|
|
|
set_color $fish_color_normal
|
|
|
|
|
|
2020-05-13 22:46:42 +03:00
|
|
|
|
printf '\r'
|
|
|
|
|
lean_left_prompt
|
2020-04-25 22:21:09 +03:00
|
|
|
|
|
2020-05-09 01:32:58 +03:00
|
|
|
|
set -l rightPrompt (lean_right_prompt)
|
|
|
|
|
set -l rightPromptStartLocation (math $COLUMNS-(string length (lean_decolor $rightPrompt)))
|
|
|
|
|
printf '\r\033['$rightPromptStartLocation'C'
|
|
|
|
|
echo $rightPrompt
|
2020-04-21 22:15:05 +03:00
|
|
|
|
|
|
|
|
|
# Prompt character
|
2020-04-29 22:32:59 +03:00
|
|
|
|
if test $last_status -eq 0
|
2020-04-21 22:15:05 +03:00
|
|
|
|
set_color $lean_color_green
|
|
|
|
|
else
|
|
|
|
|
set_color $fish_color_error
|
|
|
|
|
end
|
2020-04-30 00:52:58 +03:00
|
|
|
|
echo -n '❯ '
|
2020-04-21 22:15:05 +03:00
|
|
|
|
set_color $fish_color_normal
|
|
|
|
|
end
|
2020-05-13 22:46:42 +03:00
|
|
|
|
|