mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 12:03:48 +03:00
Unify normal var list and "immutable" one
This commit is contained in:
parent
09a610d08c
commit
44313d296e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user