2023-10-08 22:26:07 -05:00
|
|
|
function finish
|
2023-11-20 11:20:55 -06:00
|
|
|
_tide_title Finish
|
|
|
|
|
|
|
|
echo
|
2023-10-08 22:26:07 -05:00
|
|
|
set_color red
|
2023-11-20 11:20:55 -06:00
|
|
|
_tide_option y 'Overwrite your current tide config'
|
2023-10-08 22:26:07 -05:00
|
|
|
set_color normal
|
2023-11-20 11:20:55 -06:00
|
|
|
echo
|
2023-10-08 22:26:07 -05:00
|
|
|
|
2023-11-20 11:20:55 -06:00
|
|
|
_tide_option p 'Exit and print the config you just generated'
|
2023-10-08 22:26:07 -05:00
|
|
|
echo
|
|
|
|
|
2023-11-20 11:20:55 -06:00
|
|
|
_tide_menu (status function)
|
2023-10-08 22:26:07 -05:00
|
|
|
switch $_tide_selected_option
|
2023-11-20 11:20:55 -06:00
|
|
|
case 'Overwrite your current tide config'
|
2023-10-08 22:26:07 -05:00
|
|
|
_tide_finish
|
|
|
|
command -q clear && clear
|
2023-11-20 11:20:55 -06:00
|
|
|
set -q _flag_auto || _tide_print_configure_current_options
|
|
|
|
case 'Exit and print the config you just generated'
|
|
|
|
_tide_exit_configure
|
|
|
|
command -q clear && clear
|
|
|
|
_tide_print_configure_current_options
|
2023-10-08 22:26:07 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function _tide_finish
|
2023-11-20 11:20:55 -06:00
|
|
|
_tide_exit_configure
|
2023-10-08 22:26:07 -05:00
|
|
|
|
|
|
|
# Deal with prompt char/vi mode
|
|
|
|
contains character $fake_tide_left_prompt_items || set -p fake_tide_left_prompt_items vi_mode
|
|
|
|
|
|
|
|
# Set the real variables
|
|
|
|
for fakeVar in (set --names | string match -r "^fake_tide.*")
|
|
|
|
set -U (string replace 'fake_' '' $fakeVar) $$fakeVar
|
|
|
|
end
|
|
|
|
|
|
|
|
# Make sure old prompt won't display
|
|
|
|
set -e $_tide_prompt_var 2>/dev/null
|
|
|
|
|
|
|
|
# Re-initialize the prompt
|
2023-11-20 11:20:55 -06:00
|
|
|
tide reload
|
|
|
|
end
|
|
|
|
|
|
|
|
function _tide_print_configure_current_options
|
|
|
|
_tide_fish_colorize "tide configure --auto $_tide_configure_current_options"
|
2023-10-08 22:26:07 -05:00
|
|
|
end
|