diff --git a/global.zsh b/global.zsh index adf3d98..0719b7a 100644 --- a/global.zsh +++ b/global.zsh @@ -13,51 +13,6 @@ if [[ -z $globaldots_path ]]; then echo 'functions require $globaldots_path to be set!' fi -# ZCONFIG - -## stuff for global dotfiles - -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 - - +autoload global_path_expand global_fpath_expand global_set_useropts \ + global_configure global_config_setup global_boot +fpath+=(${zshlibs_install}/global) diff --git a/global/global_boot b/global/global_boot new file mode 100644 index 0000000..0c1d966 --- /dev/null +++ b/global/global_boot @@ -0,0 +1,5 @@ +function global_boot() +{ + global_configure + global_config_setup +} diff --git a/global/global_config_setup b/global/global_config_setup new file mode 100644 index 0000000..7ef4e62 --- /dev/null +++ b/global/global_config_setup @@ -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" +} diff --git a/global/global_configure b/global/global_configure new file mode 100644 index 0000000..5958280 --- /dev/null +++ b/global/global_configure @@ -0,0 +1,4 @@ +function global_configure() +{ + typeset -a -g path_extra +} diff --git a/global/global_fpath_expand b/global/global_fpath_expand new file mode 100644 index 0000000..478f37f --- /dev/null +++ b/global/global_fpath_expand @@ -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; +} diff --git a/global/global_path_expand b/global/global_path_expand new file mode 100644 index 0000000..ce57a57 --- /dev/null +++ b/global/global_path_expand @@ -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; +} diff --git a/global/global_set_useropts b/global/global_set_useropts new file mode 100644 index 0000000..e2f99da --- /dev/null +++ b/global/global_set_useropts @@ -0,0 +1,4 @@ +function global_set_useropts() +{ + typeset -a -g path_extra +}