From 8600374371f91843064441113f4023cda1730877 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sat, 18 Mar 2023 16:40:57 -0300 Subject: General fish fixes and updates --- .../tide/configure/choices/all/finish.fish | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .config/fish/functions/tide/configure/choices/all/finish.fish (limited to '.config/fish/functions/tide/configure/choices/all/finish.fish') 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 -- cgit v1.2.3