home-config/fish/functions/_tide_2_line_prompt.fish
7b8185c6ca47a6b6d27cefcd816c49e2bd7cd591
· 695 B · 31 lines
raw
| 1 | function _tide_2_line_prompt |
| 2 | set -g add_prefix |
| 3 | _tide_side=left for item in $_tide_left_items |
| 4 | _tide_item_$item |
| 5 | end |
| 6 | if not set -e add_prefix |
| 7 | set_color $prev_bg_color -b normal |
| 8 | echo $tide_left_prompt_suffix |
| 9 | end |
| 10 | |
| 11 | echo |
| 12 | |
| 13 | set -g add_prefix |
| 14 | _tide_side=right for item in $_tide_right_items |
| 15 | _tide_item_$item |
| 16 | end |
| 17 | if not set -e add_prefix |
| 18 | set_color $prev_bg_color -b normal |
| 19 | echo $tide_right_prompt_suffix |
| 20 | end |
| 21 | end |
| 22 | |
| 23 | function _tide_item_pwd |
| 24 | _tide_print_item pwd @PWD@ |
| 25 | end |
| 26 | |
| 27 | function _tide_item_newline |
| 28 | set_color $prev_bg_color -b normal |
| 29 | v=tide_"$_tide_side"_prompt_suffix echo $$v |
| 30 | set -g add_prefix |
| 31 | end |