diff options
Diffstat (limited to '.config/fish/functions/tide/configure/choices/all/finish.fish')
-rw-r--r-- | .config/fish/functions/tide/configure/choices/all/finish.fish | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.config/fish/functions/tide/configure/choices/all/finish.fish b/.config/fish/functions/tide/configure/choices/all/finish.fish new file mode 100644 index 00000000..f60a1285 --- /dev/null +++ b/.config/fish/functions/tide/configure/choices/all/finish.fish @@ -0,0 +1,33 @@ +function finish + set_color red + _tide_title 'Overwrite tide config?' + set_color normal + + _tide_option y Yes + echo + + _tide_menu + switch $_tide_selected_option + case y + _tide_finish + command -q clear && clear + end +end + +function _tide_finish + set -e _tide_selected_option # Skip through all the _next_choices + + # 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 + source (functions --details fish_prompt) +end |