zsh: add code to load all external functions

This commit is contained in:
PowerUser64 2022-01-02 17:48:01 -08:00
parent e8064cfac3
commit 51eca82961

22
.zshrc
View file

@ -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() {