X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Flaunch_feisty_meow.sh;h=2f8aca0832a1000cd97cbaa150c5ecb725cf7d0b;hb=9ebae4831763d4c2851286f7fea265c27bd500e5;hp=4a6184e687571f4a8c8404eaa09dd0e334eaa2b1;hpb=12d3b0a9a2dae8d187318c52465fd262c74b0c85;p=feisty_meow.git diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index 4a6184e6..2f8aca08 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -18,6 +18,13 @@ ############## +# first step--capture the current path if we haven't already. +if [ -z "$FEISTY_MEOW_ORIGINAL_PATH" ]; then + export FEISTY_MEOW_ORIGINAL_PATH="$PATH" +fi + +############## + # this script cannot handle figuring out where it lives, so approaches that # get the THISDIR will fail. this is a consequence of this always being used # in bash's 'source' directive, which does not pass the script name as @@ -86,6 +93,13 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then # some preconditions we want to establish before loading anything... # make sure that aliases can be used in non-interactive shells. + # this causes all aliases that are currently defined for this shell to + # be inherited by subshells that this shell starts. this is unusual, + # but is preferred for my workflow in feisty meow scripts; it saves me + # time re-adding aliases if i can count on them already being there. + # this is a problem if you *don't* want the aliases there though. we can + # solve that problem by running bash with the "-O expand_aliases" flags to + # stop the expansion for the next subshell. shopt -s expand_aliases # patch the user variable if we were launched by one of our cron jobs. @@ -97,7 +111,7 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then # this allows root or other su'd identities to create windows with same # display variable. if [ ! -z "$DISPLAY" -a ! -z "$IMPORTED_XAUTH" ]; then - xauth add "$IMPORTED_XAUTH" + xauth add $DISPLAY . $IMPORTED_XAUTH fi ############## @@ -111,7 +125,7 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then # this is our single entry point we can use without knowing any variables # yet in the initialization process. export FEISTY_MEOW_LOADING_DOCK="$HOME/.zz_feisty_loading" - #hmmm: the above is kind of a constant. that's not so great. +#hmmm: the above is kind of a constant. that's not so great. # make sure our main variables are established. FEISTY_MEOW_VARIABLES_LOADING_FILE="$FEISTY_MEOW_LOADING_DOCK/fmc_variables.sh"