diff --git a/.zshrc b/.zshrc index 908b364..cdcc491 100644 --- a/.zshrc +++ b/.zshrc @@ -198,8 +198,26 @@ # <<< ### Functions >>> { - # grab all shell functions that are in files - source "$SHELL_CONFIG_DIR"/functions/* + # # put all shell functions in their own function that allows them to be updated + # for FN_PATH in "$SHELL_CONFIG_DIR"/functions/*;do + # FN="${FN_PATH##*/}" + # "$FN"() { + # $(source "$FN_PATH") + # } + # + # echo "Declared function $FN" + # echo "Contents of $FN:" + # which "$FN" + # echo + # done + + # load all functions that are stored in files + fnupdate() { + for FN in "$SHELL_CONFIG_DIR"/functions/*;do + source "$FN" + done + } + fnupdate # for sending error messages from functions and whatnot error() {