IFS="$HOLDIFS"
}
+ # when passed a list of things, this will return the unique items from that list as an echo.
+ function uniquify()
+ {
+ # do the uniquification: split the space separated items into separate lines, then
+ # sort the list, then run the uniq tool on the list. results will be packed back onto
+ # one line when invoked like: local fredlist="$(uniquify a b c e d a e f a e d b)"
+ echo $* | tr ' ' '\n' | sort | uniq
+ }
+
# sets the variable in parameter 1 to the value in parameter 2, but only if
# that variable was undefined.
function set_var_if_undefined()
local pid_finder_pattern='s/ *\([0-9][0-9]*\) *.*$/\1/p'
else
- # flags which clean up the output on unixes, which apparently cygwin
- # doesn't count as. their crappy specialized ps doesn't support this.
+ # flags which clean up the process listing output on unixes.
+ # apparently cygwin doesn't count as a type of unix, because their
+ # crummy specialized ps command doesn't support normal ps flags.
local EXTRA_UNIX_FLAGS="-o pid,args"
# pattern to use for peeling off the process numbers.
local pid_finder_pattern='s/^[[:space:]]*\([0-9][0-9]*\).*$/\1/p'
# information for su.
# get the x authority info for our current user.
- source $FEISTY_MEOW_SCRIPTS/x_win/get_x_auth.sh
+ source "$FEISTY_MEOW_SCRIPTS/security/get_x_auth.sh"
if [ -z "$X_auth_info" ]; then
# if there's no authentication info to pass along, we just do a normal su.
# fi
}
- # trashes the .#blah files that cvs and svn leave behind when finding conflicts.
+ # trashes the .#blah files that cvs and subversion leave behind when finding conflicts.
# this kind of assumes you've already checked them for any salient facts.
function clean_cvs_junk() {
for i in $*; do
unalias CORE_ALIASES_LOADED &>/dev/null
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
restore_terminal_title
##############
+#hmmm: this points to an extended functions file being needed; not all of these are core.
+
+ # displays documentation in "md" formatted files.
+ function show_md()
+ {
+ local file="$1"; shift
+ pandoc "$file" | lynx -stdin
+ }
+
+ ##############
+
# just shows a separator line for an 80 column console, or uses the first
# parameter as the number of columns to expect.
function separator()