improved reload, where incorrect usage of alias on a function was just always reloadi...
authorChris Koeritz <fred@gruntose.com>
Mon, 30 Mar 2015 23:43:58 +0000 (19:43 -0400)
committerChris Koeritz <fred@gruntose.com>
Mon, 30 Mar 2015 23:43:58 +0000 (19:43 -0400)
customizing/fred/fred_variables.sh
scripts/core/common.alias
scripts/core/functions.sh
scripts/core/launch_feisty_meow.sh
scripts/core/variables.sh

index e67519f494d948930cc6de1b510076e6f76cd0f5..2b99476dcff6ac73a2a4a5df27ef31281c3ca936 100644 (file)
@@ -27,7 +27,7 @@ if [ -z "$NETHACKOPTIONS" ]; then
   export CLAM_FINISH_SOUND='/z/walrus/media/sounds/cartoons/meepmeep.wav'
 
   # Setup for nethack adventure.
-  export NETHACKOPTIONS='name:Manjusri-W,dogname:Fred,catname:Zonker'
+  export NETHACKOPTIONS="name:Manjusri-W,dogname:Fred,catname:Zonker"
 
   # mail setup for home machines.
 #  export REPLYTO=fred@gruntose.com
index 1a6896b585c239aa1b8a03ea43ff52616673e973..5d2e67828e0dac1fe58950d695bef8d91d46c208 100644 (file)
@@ -113,3 +113,8 @@ unalias fredme &>/dev/null
 
 ##############
 
+# set the sentinel variable that says this file was handled.
+export CORE_ALIASES_LOADED=true
+
+##############
+
index 77ea00bdacc67cb1a18356e7bd92fda95ea2cd11..a111348cbb2f0a9f8cc2cd56d5e48fa1415a6085 100644 (file)
@@ -285,9 +285,14 @@ if [ -z "$skip_all" ]; then
     bash $FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh
     echo
     # force a full reload by turning off sentinel variable and alias.
-    unset NECHUNG function_sentinel
+    # the nethack one is used by fred's customizations.
+    # interesting note perhaps: found that the NETHACKOPTIONS variable was
+    # not being unset correctly when preceded by an alias.  split them up
+    # like they are now due to that bug.
+    unset -v FEISTY_MEOW_GENERATED NECHUNG NETHACKOPTIONS 
+    unset -f function_sentinel 
     # reload feisty meow environment in current shell.
-    source ~/feisty_meow/scripts/core/launch_feisty_meow.sh
+    source $FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh
     # run nechung oracle to give user a new fortune.
     nechung
   }
index 3d732179f38a1e28b6fd056c11b87364fc9a4967..b307a24e9f7e979772481d77016184cb0e5c00de 100644 (file)
@@ -83,8 +83,7 @@ if [ -z "$LIGHTWEIGHT_INIT" ]; then
   if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login begins...; fi
 
   # set up the aliases for the shell, but only if they are not already set.
-  alias regenerate &>/dev/null  # see if a crucial alias exists.
-  if [ $? -ne 0 ]; then
+  if [ -z "$CORE_ALIASES_LOADED" ]; then
     if [ ! -z "$SHELL_DEBUG" ]; then
       echo the aliases were missing, now they are added...
     fi
index 31da35faf7c2413186721c9bf70a33067ac7ce42..befd665c14e4aafaf77e3af5e362a15ff791b4cd 100644 (file)
@@ -207,6 +207,6 @@ for i in $FEISTY_MEOW_GENERATED/custom/*.sh; do
   if [ ! -z "$SHELL_DEBUG" ]; then
     echo "loading customization: $(basename $(dirname $i))/$(basename $i)"
   fi
-  source $i
+  source "$i"
 done