diff --git a/conf.d/_tide_init.fish b/conf.d/_tide_init.fish index e80ad81..50d79d5 100644 --- a/conf.d/_tide_init.fish +++ b/conf.d/_tide_init.fish @@ -1,16 +1,22 @@ function _tide_init_install --on-event _tide_init_install - _set_immutable _tide_color_dark_blue 0087AF - _set_immutable _tide_color_dark_green 5FAF00 - _set_immutable _tide_color_gold D7AF00 - _set_immutable _tide_color_green 5FD700 - _set_immutable _tide_color_light_blue 00AFFF + set -U _tide_var_list + + # Tiny improvment to shell startup, which makes async faster + function _tide_set -a var_name + set -U $var_name $argv[2..-1] + set -a _tide_var_list $var_name + end + + _tide_set _tide_color_dark_blue 0087AF + _tide_set _tide_color_dark_green 5FAF00 + _tide_set _tide_color_gold D7AF00 + _tide_set _tide_color_green 5FD700 + _tide_set _tide_color_light_blue 00AFFF # Each string replace is kind of dirname - _set_immutable _tide_root (status current-filename | string replace --regex '/[^/]+$' '' | string replace --regex '/[^/]+$' '') + _tide_set _tide_root (status current-filename | string replace --regex '/[^/]+$' '' | string replace --regex '/[^/]+$' '') - _set_immutable VIRTUAL_ENV_DISABLE_PROMPT true - - set -U _tide_var_list + _tide_set VIRTUAL_ENV_DISABLE_PROMPT true source $_tide_root/functions/tide/configure/choices/all/style.fish _load_config 'lean' @@ -30,16 +36,10 @@ function _tide_init_install --on-event _tide_init_install end function _tide_init_uninstall --on-event _tide_init_uninstall - for var in $_tide_var_immutable_list $_tide_var_list + for var in $_tide_var_list set -e $var end - set -e _tide_var_immutable_list set -e _tide_var_list functions --erase (functions --all | string match --entire --regex '^_tide_') end - -function _set_immutable -a var_name - set -U $var_name $argv[2..-1] - set -Ua _tide_var_immutable_list $var_name -end