a new approach had rearranged the order of alias creation, leading one bank of them to think they had already been loaded. now a finalizer file is used instead, and it is the last thing loaded in the alias creation sequence.
##############
# set the sentinel alias that says this file was handled.
##############
# set the sentinel alias that says this file was handled.
-alias CORE_ALIASES_LOADED=true
+#alias CORE_ALIASES_LOADED=true
#really need to use better exit codes.
}
#really need to use better exit codes.
}
$FEISTY_MEOW_LOADING_DOCK =~ s/\\/\//g;
$FEISTY_MEOW_SCRIPTS =~ s/\\/\//g;
$FEISTY_MEOW_APEX =~ s/\\/\//g;
$FEISTY_MEOW_LOADING_DOCK =~ s/\\/\//g;
$FEISTY_MEOW_SCRIPTS =~ s/\\/\//g;
$FEISTY_MEOW_APEX =~ s/\\/\//g;
# create our generated shells directory if it's not already there.
if (! -d $FEISTY_MEOW_LOADING_DOCK) {
mkdir $FEISTY_MEOW_LOADING_DOCK;
# create our generated shells directory if it's not already there.
if (! -d $FEISTY_MEOW_LOADING_DOCK) {
mkdir $FEISTY_MEOW_LOADING_DOCK;
system("chmod -R u+x \"$FEISTY_MEOW_BINARIES\"/*");
}
system("chmod -R u+x \"$FEISTY_MEOW_BINARIES\"/*");
}
# generate the first set of alias files that are defined in the core
# and custom scripts directories.
&rebuild_script_aliases;
# generate the first set of alias files that are defined in the core
# and custom scripts directories.
&rebuild_script_aliases;
# trash the old versions.
unlink("$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh");
# trash the old versions.
unlink("$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh");
printf "writing $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh...\n";
}
printf "writing $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh...\n";
}
# open the alias files to be created.
open(she, ">> $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh");
# open the alias files to be created.
open(she, ">> $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh");
+##############
+
+# prepare a finalizer chunk that is the last thing to load.
+
+open(she, ">> $FEISTY_MEOW_LOADING_DOCK/fmc_ending_sentinel.sh");
+
+# write in our sentinel alias that says alias loading was handled.
+print she "define_yeti_alias CORE_ALIASES_LOADED=true\n";
+
+close(she);
+
+##############
+
if [ -z "$ERROR_OCCURRED" ]; then
if [ -z "$ERROR_OCCURRED" ]; then
# pull in our generated variables that are the minimal set we need to find
# the rest of our resources.
source "$FEISTY_MEOW_VARIABLES_LOADING_FILE"
# pull in our generated variables that are the minimal set we need to find
# the rest of our resources.
source "$FEISTY_MEOW_VARIABLES_LOADING_FILE"
# Set up the temporary directory.
source "$FEISTY_MEOW_SCRIPTS/core/create_tempdir.sh"
# Set up the temporary directory.
source "$FEISTY_MEOW_SCRIPTS/core/create_tempdir.sh"
if [ -z "$ERROR_OCCURRED" ]; then
if [ -z "$ERROR_OCCURRED" ]; then
# load the larger body of standard feisty meow variables into the environment.
# we actually want this to always run also; it will decide what variables need
# to be set again.
source "$FEISTY_MEOW_SCRIPTS/core/variables.sh"
# load the larger body of standard feisty meow variables into the environment.
# we actually want this to always run also; it will decide what variables need
# to be set again.
source "$FEISTY_MEOW_SCRIPTS/core/variables.sh"
##############
# include helpful functions. we do this every time rather than making it part
##############
# include helpful functions. we do this every time rather than making it part
# sub-shells in bash.
source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
# sub-shells in bash.
source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
# load some helper methods for the terminal which we'll use below.
source "$FEISTY_MEOW_SCRIPTS/tty/terminal_titler.sh"
# load some helper methods for the terminal which we'll use below.
source "$FEISTY_MEOW_SCRIPTS/tty/terminal_titler.sh"
+#hmmm: abstract this to a twiddle shell options method.
# check hash table before searching path.
shopt -s checkhash
# don't check path for sourced files.
# check hash table before searching path.
shopt -s checkhash
# don't check path for sourced files.
shopt -s checkwinsize
##############
shopt -s checkwinsize
##############
# make history writes immediate to avoid losing history if bash is zapped.
echo $PROMPT_COMMAND | grep -q history
# make history writes immediate to avoid losing history if bash is zapped.
echo $PROMPT_COMMAND | grep -q history
if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "heavyweight init begins..."; fi
if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "heavyweight init begins..."; fi
# set up the aliases for the shell, but only if they are not already set.
type CORE_ALIASES_LOADED &>/dev/null
if [ $? -ne 0 ]; then
# set up the aliases for the shell, but only if they are not already set.
type CORE_ALIASES_LOADED &>/dev/null
if [ $? -ne 0 ]; then
#echo before the new labelling, terminal titles have:
#show_terminal_titles
#echo before the new labelling, terminal titles have:
#show_terminal_titles
unset FEISTY_MEOW_SHOW_LAUNCH_GREETING
fi
unset FEISTY_MEOW_SHOW_LAUNCH_GREETING
fi
+ # load the last bits we do here.
+ source "$FEISTY_MEOW_LOADING_DOCK/fmc_ending_sentinel.sh"
+
fi # "$NO_REPAIRS_NEEDED" was == "true"
fi # "$NO_REPAIRS_NEEDED" was == "true"