X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=535f5ecdaa1c2df8c79aa61ff637f6d5e865bd83;hb=b33ab63436278c7de3c1dd6e0371d9e28788cfb8;hp=6415adbe26faa294b6f843d5be5907bbd52fc271;hpb=45270050ecd39f120c55acd7b18b0f08f3a0de8b;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 6415adbe..535f5ecd 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -488,6 +488,48 @@ if [ -z "$skip_all" ]; then ############## +# new breed of definer functions goes here. still in progress. + + # defines an alias and remembers that this is a new or modified definition. + # if the feisty meow codebase is unloaded, then so are all the aliases that + # were defined. + function define_yeti_alias() + { +# if alias exists already, save old value for restore, +# otherwise save null value for restore, +# have to handle unaliasing if there was no prior value of one +# we newly defined. +# add alias name to a list of feisty defined aliases. + +#hmmm: first implem, just do the alias and get that working... +alias "${@}" + + +return 0 + } + + # defines a variable within the feisty meow environment and remembers that + # this is a new or modified definition. if the feisty meow codebase is + # unloaded, then so are all the variables that were defined. + # this function always exports the variables it defines. + function define_yeti_variable() + { +# if variable exists already, save old value for restore, +# otherwise save null value for restore, +# have to handle unsetting if there was no prior value of one +# we newly defined. +# add variable name to a list of feisty defined variables. + +#hmmm: first implem just sets it up and exports the variable. +# i.e., this method always exports. +export "${@}" + + +return 0 + } + + ############## + function function_sentinel() { return 0; } if [ ! -z "$SHELL_DEBUG" ]; then echo "feisty meow function definitions done."; fi