home-config/fish/functions/tide/configure/choices/lean/lean_prompt_height.fish
04342290047f1b93108e5abab8dfdac11e1e7013
· 1.0 KB · 26 lines
raw
| 1 | function lean_prompt_height |
| 2 | _tide_title 'Prompt Height' |
| 3 | |
| 4 | _tide_option 1 'One line' |
| 5 | _tide_find_and_remove newline fake_tide_left_prompt_items |
| 6 | set -g fake_tide_left_prompt_suffix '' |
| 7 | _tide_display_prompt |
| 8 | |
| 9 | _tide_option 2 'Two lines' |
| 10 | set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] newline $fake_tide_left_prompt_items[-1] |
| 11 | set -g fake_tide_left_prompt_suffix ' ' |
| 12 | _tide_display_prompt |
| 13 | |
| 14 | _tide_menu (status function) |
| 15 | switch $_tide_selected_option |
| 16 | case 'One line' |
| 17 | _tide_find_and_remove newline fake_tide_left_prompt_items |
| 18 | set fake_tide_left_prompt_suffix '' |
| 19 | _next_choice all/prompt_connection_andor_frame_color |
| 20 | case 'Two lines' |
| 21 | _tide_find_and_remove newline fake_tide_left_prompt_items |
| 22 | set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] newline $fake_tide_left_prompt_items[-1] |
| 23 | set -g fake_tide_left_prompt_suffix ' ' |
| 24 | _next_choice all/prompt_connection |
| 25 | end |
| 26 | end |