make path_add more correct for dash
[distro-setup] / .bashrc
diff --git a/.bashrc b/.bashrc
index 5b4c3d102a87cd05aad2dfa66dc6b5a9190bc989..b8b286116ede7d64a5d9a4cac07de4d8aa702e32 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -54,31 +54,31 @@ CDPATH=.:/a
 # there is probably a more proper way, but I didn't find any easily on google
 unset GNOME_KEYRING_CONTROL
 
-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
 #include .files when globbing.
 shopt -s dotglob
+#but ignore files name . and ..
+#those are default when this is set to anything, so we just set it to one of them
+export GLOBIGNORE=.
 
-# disabled because it is broken with bash_completion package. It is a known bug they hope to fix.
-# When a glob expands to nothing, make it an empty string instead of the literal characters.
-# shopt -s nullglob
+# broken with bash_completion package. Saw a bug for this once. Don't anymore.
+# still broken in wheezy
+# still buggered in latest stable from the web, version 2.1
+# perhaps its fixed in newer git version, which fails to make for me
+#shopt -s nullglob
 
 # make tab on an empty line do nothing
 shopt -s no_empty_cmd_completion
 
-
 # advanced completion
 # http://bash-completion.alioth.debian.org/
-# i was using the git version for a while for a bug fix.
-# it's made it into distros now
-# usually this is sourced by the system already,
-# but I check just incase
+# might be sourced by the system already, but I've noticed it not being sourced before
 if ! type _init_completion &> /dev/null && [[ -r "/usr/share/bash-completion/bash_completion" ]]; then
     . /usr/share/bash-completion/bash_completion
 fi
 
+
 # fix spelling errors for cd, only in interactive shell
 shopt -s cdspell
 # append history instead of overwritting it
@@ -146,7 +146,7 @@ unset HISTIGNORE
 
 export BC_LINE_LENGTH=0
 
-path_add /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
+path_add --ifexists /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