#!/bin/bash
-# generates alias files for different operating systems and shell scripts.
-# or really, mainly for bash these days, on linux. but we also run under
-# msys and cygwin to some degree.
+# generates alias files for bash.
#
# The "common.alias" file is used in the generated aliases file as a base
-# set of generally useful aliases. Shorter aliases based on any scripts
-# we can find in the feisty meow script hierarchy are added in as well.
-#
-# If any other alias files are found in the scripts/custom folder, they
-# are pulled in as additions and overrides for the basic feisty meow command
-# set.
+# set of generally useful aliases. We also add aliases for any script files
+# (perl, bash, python, etc) that we find in the feisty meow script hierarchy.
+# Any *.alias files found in the scripts/custom folder are loaded also.
if [ ! -z "$SHELL_DEBUG" ]; then echo rebuiling generated aliases file...; fi
# test if we can use color in ls...
test_color=$(ls --help 2>&1 | grep -i color)
+# the main one is our common alias set.
ALIAS_DEFINITION_FILES=("$FEISTY_MEOW_SCRIPTS/core/common.alias")
+
# if custom aliases files exist, add them to the list.
for i in "$FEISTY_MEOW_SCRIPTS/custom/*.alias"; do
-echo adding $i
ALIAS_DEFINITION_FILES+=("$i")
done
echo "alias files:"
# write the aliases for sh and bash scripts.
GENERATED_ALIAS_FILE="$FEISTY_MEOW_GENERATED/aliases.sh"
-echo "writing $GENERATED_ALIAS_FILE..."
+echo "writing generated aliases in $GENERATED_ALIAS_FILE..."
#hmmm: perhaps a good place for a function to create the header,
# given the appropriate comment code.