update configure path_extra

This commit is contained in:
Aleksey 2024-04-25 21:31:30 +04:00
parent 31f67370ed
commit 8d4335438e
Signed by: tea
GPG Key ID: D9C68D34A3CAE37A
6 changed files with 8 additions and 9 deletions

View File

@ -13,6 +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
autoload global_path_expand global_fpath_expand global_set_useropts \ autoload global_path_expand global_fpath_expand \
global_configure global_config_setup global_boot global_configure global_config_setup global_boot
fpath+=(${zshlibs_install}/global) fpath+=(${zshlibs_install}/global)

View File

@ -1,7 +1,10 @@
function global_config_setup() function global_config_setup()
{ {
zshlibs_log global "expanding path with '$path_extra'" zshlibs_log global "expanding path with '$path_extra'"
global_path_expand $path_extra if [[ -n "${extras_path}" ]]
then
global_path_expand $extras_path $path_extra
fi
zshlibs_log global "expanding fpath with '$fpath_extra'" zshlibs_log global "expanding fpath with '$fpath_extra'"
global_fpath_expand vanilla global_fpath_expand vanilla
zshlibs_log global "done loading noninteractive config" zshlibs_log global "done loading noninteractive config"

View File

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

View File

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

View File

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

View File

@ -7,4 +7,3 @@ function zshlibs_path_add()
path+=(${pathtoadd}) path+=(${pathtoadd})
fi fi
} }