misc fixes and improvements
[distro-setup] / brc
diff --git a/brc b/brc
index cc38787465bce6876e795a878c7642046d4f9039..0b89b663c9173b0f0aedb0c7cc87420bd247ce89 100644 (file)
--- a/brc
+++ b/brc
@@ -227,6 +227,7 @@ if [[ -s $bashrc_dir/path-add-function ]]; then
     if grep -qF /home/iank/.iank/e/e /etc/auto.iank /etc/exports &>/dev/null; then
       export EMACSDIR=/home/iank/.iank/e/e
     fi
+    path-add $bashrc_dir
   fi
 fi
 
@@ -249,15 +250,23 @@ if [[ -s /usr/share/wcd/wcd-include.sh ]]; then
   source /usr/share/wcd/wcd-include.sh
 fi
 
-if [[ -s /a/bin/small-misc-bash/ll-function ]]; then
-  source /a/bin/small-misc-bash/ll-function
-elif [[ -s $bashrc_dir/ll-function ]]; then
-  # shellcheck source=/a/bin/small-misc-bash/ll-function
-  source $bashrc_dir/ll-function
-fi
 
+mysrc() {
+  local path dir file
+  path=$1
+  dir=${path%/*}
+  file=${path##*/}
+  if [[ -s $path ]]; then
+    source $path
+  elif [[ -s $bashrc_dir/$file ]]; then
+    source $bashrc_dir/$file
+  fi
+}
 
 
+mysrc /a/bin/small-misc-bash/ll-function
+mysrc /a/bin/distro-functions/src/package-manager-abstractions
+
 
 # * functions
 ccomp() { # copy completion
@@ -1964,6 +1973,9 @@ if [[ $- == *i* ]]; then
     if [[ $EUID != 0 ]] && [[ $DID_SUDO ]]; then
       ps_char="SUDO $ps_char"
     fi
+    if [[ ! $HISTFILE ]]; then
+      ps_char="NOHIST $ps_char"
+    fi
     PS1="${PS1%"${PS1#*[wW]}"} \[$ps_color\]$ps_char\[$term_nocolor\] "
 
     # set titlebar. instead, using more advanced