also some nice changes to various ls type aliases, now using the summing dir, and the summing dir has been fixed to actually use ls colors properly.
this is a fairly nice little set of changes...
fi
# re-use work we did on 'exp' macro for the longer windows command.
alias explorer=exp
-alias l='\ls -hFC $color_add'
-alias ls='\ls -hFC $color_add'
+alias i=inventory
+alias l='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl'
+alias ll='\ls -hFC $color_add'
+alias ls='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl'
+#='\ls -hFC $color_add'
alias lsd='ls -hl'
alias md='mkdir'
alias more='less'
if [ $? -eq 0 ]; then
# there was no error, so we can skip the inits.
if [ ! -z "$SHELL_DEBUG" ]; then
- echo skipping functions.sh because already defined.
+ echo "skipping function definitions, because already defined."
fi
skip_all=yes
fi
if [ -z "$skip_all" ]; then
if [ ! -z "$SHELL_DEBUG" ]; then
- echo function definitions begin...
+ echo "feisty meow function definitions beginning now..."
fi
# a handy little method that can be used for date strings. it was getting
# 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 -v CORE_ALIASES_LOADED 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
function function_sentinel() { return 0; }
- if [ ! -z "$SHELL_DEBUG" ]; then echo function definitions end....; fi
+ if [ ! -z "$SHELL_DEBUG" ]; then echo "feisty meow function definitions done."; fi
fi
print GENOUT "##\n";
if (length($test_color)) {
- print GENOUT "color_add=--color=auto\n";
+ print GENOUT "export color_add=--color=auto\n";
} else {
- print GENOUT "color_add=\n";
+ print GENOUT "export color_add=\n";
}
# plow in the full set of aliases into the file.
+++ /dev/null
-#!/bin/bash
-
-source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
-
-echo '=============='
-echo
-echo Your user name is $USER on a computer named $(hostname).
-echo Your machine platform is $(uname -m)
-echo -n Uptime:
-uptime
-if [ $OPERATING_SYSTEM == "UNIX" ]; then
- which lsb_release &>/dev/null
- if [ $? -eq 0 ]; then
- lsb_release -a
- fi
-fi
-echo The time is $(date_stringer | sed -e 's/_/ /g' | sed -e 's/\([0-9][0-9]\) \([0-9][0-9]\)$/:\1:\2/')
-echo
-echo '=============='
-echo
-echo You have the following files here:
-ls -FC
-echo
-echo '=============='
-echo
-echo You are sharing the machine with:
-who
-echo
-echo '=============='
-
--- /dev/null
+#!/bin/bash
+
+# a frivolous but useful script that shows information about the local
+# computer in terms of an adventure game inventory listing.
+
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
+echo
+echo '++++++++++++++++++++++++++++++++++++++++++'
+
+unset codename
+if [ $OPERATING_SYSTEM == "UNIX" ]; then
+ which lsb_release &>/dev/null
+ if [ $? -eq 0 ]; then
+ codename="$(lsb_release -cs 2>/dev/null)"
+ fi
+fi
+if [ -z "$codename" ]; then
+ codename="mysterioso"
+fi
+
+echo
+echo "it is $(date +"%A at %H%M hours on day%e of the %B moon in the gregorian year %Y" | tr A-Z a-z) and our intrepid adventurer $USER is exploring a computer named $(hostname) (code-name $codename) and has found that the machine's OS platform is $(uname -m) and its current incarnation has been $(uptime -p)." | splitter
+#hmmm: splitter not accepting these args properly right now:
+#--mincol 2 --maxcol 40
+echo
+echo '++++++++++++++++++++++++++++++++++++++++++'
+echo
+echo "the following things appear to be lying around here..."
+echo
+ls -hFC $color_add
+echo
+echo '++++++++++++++++++++++++++++++++++++++++++'
+echo
+echo "there appear to be these entities on this host..."
+echo
+who -suT
+echo
+echo '++++++++++++++++++++++++++++++++++++++++++'
+echo
+
##############
-#export SHELL_DEBUG=true
- # this variable causes the scripts that listen to it to print more information
- # when they run.
+# SHELL_DEBUG: if this variable is non-empty, then it causes the feisty meow
+# scripts to print more diagnostic information when they run. not all
+# scripts support this, but the core ones do.
-export ERROR_OCCURRED=
- # no error to start with.
+#export SHELL_DEBUG=true
##############
+export ERROR_OCCURRED=
+ # there have been no errors to start with, at least. we will set this
+ # to non-empty if something bad happens.
+
if [ -z "$FEISTY_MEOW_GENERATED" ]; then
# FEISTY_MEOW_GENERATED is where the generated files are located.
# this is our single entry point we can use without knowing any variables
##############
if [ -z "$LIGHTWEIGHT_INIT" ]; then
- # perform the bulkier parts of the login and initialization.
+ # perform the bulkier parts of the initialization process.
- if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login begins...; fi
+ if [ ! -z "$SHELL_DEBUG" ]; then echo "heavyweight init begins..."; fi
# set up the aliases for the shell, but only if they are not already set.
if [ -z "$CORE_ALIASES_LOADED" ]; then
if [ ! -z "$SHELL_DEBUG" ]; then
- echo the aliases were missing, now they are added...
+ echo "the aliases were missing, now they are being added..."
fi
source "$FEISTY_MEOW_GENERATED/fmc_core_and_custom_aliases.sh"
fi
# allow connections to our x server from the local host.
if [ ! -z "$DISPLAY" ]; then
if [ ! -z "$(echo "$OS_TYPE" | grep -i darwin)" ]; then
- if [ ! -z "$SHELL_DEBUG" ]; then echo Enabling localhost X connections...; fi
+ if [ ! -z "$SHELL_DEBUG" ]; then echo "Enabling localhost X connections..."; fi
xhost + localhost >/dev/null 2>&1
fi
fi
# a minor tickle of the title of the terminal, in case there is one.
bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
- if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login ends....; fi
+ if [ ! -z "$SHELL_DEBUG" ]; then echo "heavyweight init is done."; fi
fi
if [ -z "$ERROR_OCCURRED" ]; then
# sets the history length and max file size so we can get some long history around here.
export HISTSIZE=1000000
export HISTFILESIZE=8000000
+
+# make the TERM available to all sub-shells.
+export TERM
##############
require "filename_helper.pl";
-use Env qw(TMP);
+use Env qw($TMP $color_add $TERM);
local($chewed_line) = "";
local(@arg_list);
local($temp_file)=`mktemp "$TMP/zz_frdsumdir.XXXXXX"`;
chop($temp_file);
-system("ls -hlF $chewed_line >$temp_file");
+# drop the main payload, the list of directory info, but also save that
+# info to a file for analysis.
+system("ls -hlF $color_add $chewed_line");
+system("ls -hlF $color_add $chewed_line > $temp_file");
+ # the color_add variable, if defined, will have flags for setting the
+ # directory listing color scheme.
##print "file is: $temp_file\n";
-# drop the main payload, the list of directory info.
-system("cat $temp_file");
-
local($lengths) = 0;
# open the file and process the lines to get file lengths.