split global

This commit is contained in:
Aleksey 2024-01-18 19:32:40 +04:00
parent c72676ccac
commit 31f67370ed
Signed by: tea
GPG Key ID: D9C68D34A3CAE37A
7 changed files with 38 additions and 48 deletions

View File

@ -13,51 +13,6 @@ if [[ -z $globaldots_path ]]; then
echo 'functions require $globaldots_path to be set!' echo 'functions require $globaldots_path to be set!'
fi fi
# ZCONFIG autoload global_path_expand global_fpath_expand global_set_useropts \
global_configure global_config_setup global_boot
## stuff for global dotfiles fpath+=(${zshlibs_install}/global)
function global_path_expand()
{
local bin_base=${globaldots_path}/bin
for pathnew in ${*}; do
zshlibs_path_add "${bin_base}/${pathnew}"
done;
}
function global_fpath_expand()
{
local bin_base=${globaldots_path}/bin
for pathnew in ${*}; do
zshlibs_fpath_add "${bin_base}/${pathnew}"
done;
}
function global_set_useropts()
{
typeset -a -g path_extra
}
function global_configure()
{
typeset -a -g path_extra
}
function global_config_setup()
{
zshlibs_log global "expanding path with '$path_extra'"
global_path_expand $path_extra
zshlibs_log global "expanding fpath with '$fpath_extra'"
global_fpath_expand vanilla
zshlibs_log global "done loading noninteractive config"
}
function global_boot()
{
global_configure
global_config_setup
}
## normal functions

5
global/global_boot Normal file
View File

@ -0,0 +1,5 @@
function global_boot()
{
global_configure
global_config_setup
}

View File

@ -0,0 +1,8 @@
function global_config_setup()
{
zshlibs_log global "expanding path with '$path_extra'"
global_path_expand $path_extra
zshlibs_log global "expanding fpath with '$fpath_extra'"
global_fpath_expand vanilla
zshlibs_log global "done loading noninteractive config"
}

4
global/global_configure Normal file
View File

@ -0,0 +1,4 @@
function global_configure()
{
typeset -a -g path_extra
}

View File

@ -0,0 +1,7 @@
function global_fpath_expand()
{
local bin_base=${globaldots_path}/bin
for pathnew in ${*}; do
zshlibs_fpath_add "${bin_base}/${pathnew}"
done;
}

View File

@ -0,0 +1,7 @@
function global_path_expand()
{
local bin_base=${globaldots_path}/bin
for pathnew in ${*}; do
zshlibs_path_add "${bin_base}/${pathnew}"
done;
}

View File

@ -0,0 +1,4 @@
function global_set_useropts()
{
typeset -a -g path_extra
}