# so I can share my bashrc
source $HOME/bin/bash_private
-source $HOME/path-add-function
+source $HOME/path_add-function
CDPATH=.:/a
-path-add /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
+path_add /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
#use extra globing features. See man bash, search extglob.
shopt -s extglob
export BC_LINE_LENGTH=0
-path-add /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
-path-add $HOME/bin/bash-programs-by-ian/utils
+path_add /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
+path_add $HOME/bin/bash-programs-by-ian/utils
# note, if I use a machine I don't want files readable by all users, set
# umask 077 # If fewer than 4 digits are entered, leading zeros are assumed
dt() {
- date "+%A, %B %d, %rq" "$@"
+ date "+%A, %B %d, %r" "$@"
}
# no bashisms so it can be used in debian profile run by dash
# --start adds to start of path, which will give it highest priority
# --ifexists will add to path only if the directory exists
-path-add() {
+path_add() {
local found x y z
- local ifexists=false
- local start=false
+ local ifexists start
+ ifexists=false
+ start=false
while [ "$1" = --* ]; do
if [ "$1" = --start ]; then
start=true
done
unset IFS
if ! $found; then
- if [ $ifexists = false ] || [ -d $x ]; then
+ if ! $ifexists || [ -d $x ]; then
if $start; then
PATH="$x:$PATH"
else