home-config/fish/functions/tide/configure/choices/all/style.fish

a68eca169b8b165571a257d640ab772d81cf263f · 959 B · 36 lines raw

1 function style
2 set -g _tide_configure_current_options
3
4 _tide_title 'Prompt Style'
5
6 _tide_option 1 Lean
7 _load_config lean
8 _tide_display_prompt
9
10 _tide_option 2 Classic
11 _load_config classic
12 _tide_display_prompt
13
14 _tide_option 3 Rainbow
15 _load_config rainbow
16 _tide_display_prompt
17
18 _tide_menu (status function) --no-restart
19 switch $_tide_selected_option
20 case Lean
21 _load_config lean
22 set -g _tide_configure_style lean
23 case Classic
24 _load_config classic
25 set -g _tide_configure_style classic
26 case Rainbow
27 _load_config rainbow
28 set -g _tide_configure_style rainbow
29 end
30 _next_choice all/prompt_colors
31 end
32
33 function _load_config -a name
34 string replace -r '^' 'set -g fake_' <(status dirname)/../../icons.fish | source
35 string replace -r '^' 'set -g fake_' <(status dirname)/../../configs/$name.fish | source
36 end