From f5b1f38800ebb94c2523751224905ed9ee770e01 Mon Sep 17 00:00:00 2001 From: accel Date: Tue, 11 Jan 2022 18:01:21 +0300 Subject: [PATCH] add zshlibs path functions --- global.funcs.zsh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/global.funcs.zsh b/global.funcs.zsh index ea05a4e..d436d3a 100644 --- a/global.funcs.zsh +++ b/global.funcs.zsh @@ -76,13 +76,28 @@ function zshlibs_log() fi } +function zshlibs_path_add() +{ + local pathtoadd="${1}" + zshlibs_log $0 "adding path '$pathtoadd' to \$PATH" + if [[ ! ${path[(r)${pathtoadd}]} ]] + then + path+=(${pathtoadd}) + fi +} + +function zshlibs_fpath_add() +{ + local fpathtoadd="${1}" + zshlibs_log $0 "adding fpath '$fpathtoadd' to \$fpath" + if [[ ! ${fpath[(r)${fpathtoadd}]} ]] + then + path+=(${fpathtoadd}) + fi +} ##### CONFIGURATION LIBRARIES -function zlibs_path_expand() -{ - -} function global_path_expand() {