2020-04-13 01:40:49 +03:00
|
|
|
function lean_uninstall
|
2020-04-16 00:09:59 +03:00
|
|
|
if user_ask "Unininstall lean theme?" y/N
|
2020-04-15 03:52:21 +03:00
|
|
|
echo "Uninstalling lean theme..."
|
2020-04-16 00:09:59 +03:00
|
|
|
|
2020-04-15 03:52:21 +03:00
|
|
|
# ------------------Remove Functions------------------
|
2020-04-16 00:09:59 +03:00
|
|
|
set fns fish_prompt lean_git_prompt lean_pwd lean_uninstall user_ask
|
2020-04-13 01:40:49 +03:00
|
|
|
|
2020-04-15 03:52:21 +03:00
|
|
|
for fn in $fns
|
2020-04-16 00:09:59 +03:00
|
|
|
rm "$__fish_config_dir/functions/$fn.fish"
|
2020-04-15 03:52:21 +03:00
|
|
|
end
|
2020-04-13 01:40:49 +03:00
|
|
|
|
2020-04-15 03:52:21 +03:00
|
|
|
# ---------------Erase Theme Variables---------------
|
|
|
|
# --------------Colors--------------
|
|
|
|
set vars $vars lean_green lean_light_blue lean_dark_blue lean_gold
|
|
|
|
# ---------------Pwd---------------
|
|
|
|
set vars $vars fish_prompt_pwd_dir_length lean_shorten_pwd_margin
|
|
|
|
# ------------Git prompt------------
|
|
|
|
set vars $vars __fish_git_prompt_show_informative_status __fish_git_prompt_showstashstate
|
|
|
|
# -------Symbols-------
|
|
|
|
set vars $vars __fish_git_prompt_char_stateseparator __fish_git_prompt_char_cleanstate
|
|
|
|
set vars $vars __fish_git_prompt_char_upstream_ahead __fish_git_prompt_char_upstream_behind
|
|
|
|
set vars $vars __fish_git_prompt_char_stagedstate __fish_git_prompt_char_dirtystate
|
|
|
|
set vars $vars __fish_git_prompt_char_untrackedfiles __fish_git_prompt_char_stashstate
|
|
|
|
# --------Colors--------
|
|
|
|
set vars $vars __fish_git_prompt_color_branch __fish_git_prompt_color_upstream
|
|
|
|
set vars $vars __fish_git_prompt_color_stagedstate __fish_git_prompt_color_dirtystate
|
|
|
|
set vars $vars __fish_git_prompt_color_untrackedfiles __fish_git_prompt_color_stashstate
|
2020-04-13 02:58:24 +03:00
|
|
|
|
2020-04-15 03:52:21 +03:00
|
|
|
for var in $vars
|
|
|
|
set -e $var
|
2020-04-13 02:58:24 +03:00
|
|
|
end
|
2020-04-15 03:52:21 +03:00
|
|
|
|
|
|
|
echo "Lean theme uninstalled. Exiting fish."
|
|
|
|
sleep 1
|
|
|
|
exit
|
|
|
|
else
|
|
|
|
echo "Aborted uninstall."
|
2020-04-13 02:58:24 +03:00
|
|
|
end
|
|
|
|
end
|