zsh: add code to load all external functions
This commit is contained in:
parent
e8064cfac3
commit
51eca82961
1 changed files with 20 additions and 2 deletions
22
.zshrc
22
.zshrc
|
@ -198,8 +198,26 @@
|
||||||
# <<<
|
# <<<
|
||||||
### Functions >>>
|
### Functions >>>
|
||||||
{
|
{
|
||||||
# grab all shell functions that are in files
|
# # put all shell functions in their own function that allows them to be updated
|
||||||
source "$SHELL_CONFIG_DIR"/functions/*
|
# 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
|
# for sending error messages from functions and whatnot
|
||||||
error() {
|
error() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue