Update uninstall

This commit is contained in:
Ilan Cosman 2020-05-21 22:11:20 -07:00
parent 2a35234423
commit 5491b09e8d
2 changed files with 12 additions and 10 deletions

View File

@ -23,6 +23,15 @@ function tide_install -a branch
end
rm -rf "$tempDir/.git"
# Add contents of conf.d and functions to a list for uninstallation
set -U _tide_file_list
for file in "$tempDir/"{conf.d/*, functions/*}
if test "$file" != "$tempDir/functions/fish_prompt.fish"
set -a _tide_file_list (string replace "$tempDir/" '' $file)
end
end
# Copy remaining directory contents into $__fish_config_dir and ctideup
cp -rf "$tempDir/." $__fish_config_dir
rm -rf $tempDir
@ -48,6 +57,7 @@ end
function _set_tide_defaults
set -U _tide_var_list
set -a _tide_var_list _tide_file_list
# -------------------Local Variables-------------------
set -l tideColorGold D7AF00

View File

@ -18,16 +18,8 @@ function tide_uninstall
source "$__fish_data_dir/functions/fish_prompt.fish"
end
set -a tideFunctions 'tide'
set -a tideFunctions 'tide_'{'decolor', 'left_prompt', 'right_prompt'}
set -a tideFunctions '_tide_'{'cmd_duration', 'context', 'git_prompt', 'jobs', 'newline', 'prompt_char', 'pwd', 'status', 'time'}
for func in $tideFunctions
rm "$__fish_config_dir/functions/$func.fish"
end
set -a tideConfd 'tide_'{'count_left_prompt_height', 'cursor_movement'}
for file in $tideConfd
rm "$__fish_config_dir/conf.d/$file.fish"
for file in $_tide_file_list
rm "$__fish_config_dir/$file"
end
# -----------------------------Erase Theme Variables------------------------------