diff --git a/install.fish b/install.fish index 5bc5c86..4fa2c0a 100644 --- a/install.fish +++ b/install.fish @@ -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 diff --git a/tide_theme/functions/uninstall.fish b/tide_theme/functions/uninstall.fish index d3e4275..b0e7ed8 100644 --- a/tide_theme/functions/uninstall.fish +++ b/tide_theme/functions/uninstall.fish @@ -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------------------------------