various fixes and mail improvements
[distro-setup] / brc
diff --git a/brc b/brc
index cdfac012cb45c2c94a79d0999a14e2929cb8bcf2..bf8548f11dee9c65259cbca9395dd6eea1c311eb 100644 (file)
--- a/brc
+++ b/brc
@@ -157,7 +157,7 @@ HISTCONTROL=ignoredups
 # works in addition to HISTCONTROL to do more flexible things
 # it could also do the same things as HISTCONTROL and thus replace it,
 # but meh. dunno why, but just " *" does glob expansion, so use [ ] to avoid it.
-HISTIGNORE='pass *:[ ]*:lom*:gram*'
+HISTIGNORE='pass *:[ ]*:otp *:oathtool *'
 
 export BC_LINE_LENGTH=0
 
@@ -1713,6 +1713,9 @@ srun() {
   ssh $1 /tmp/${2##*/} "${@:2}"
 }
 
+ssh() {
+  BASH_LOGIN_SHELL=true command ssh "$@"
+}
 sss() { # ssh solo
   ssh -oControlMaster=no -oControlPath=/ "$@"
 }
@@ -1821,11 +1824,11 @@ _dosieve() {
 
 # always run this first, edit the test files, then run the following
 testsieve() {
-  _dosieve ~/sieve/maintest.sieve INBOX delete
+  _dosieve ~/sieve/maintest.sieve ${1:-INBOX} delete
 }
 runsieve() {
   c ~/sieve; cp personal{test,}.sieve; cp lists{test,}.sieve
-  _dosieve ~/sieve/main.sieve -eW INBOX delete
+  _dosieve ~/sieve/main.sieve -eW ${1:-INBOX} delete
 }
 
 # mail related
@@ -2176,6 +2179,10 @@ if [[ $- == *i* ]]; then
     if [[ -e /nocow/btrfs-stale ]] && ((`command ls -AUq /nocow/btrfs-stale|wc -l`)); then
       ps_char="! $ps_char"
     fi
+    if [[ -e /nocow/mailtest-failure ]]; then
+      ps_char="@#$@#$ $ps_char"
+    fi
+    source /a/bin/bash_unpublished/source-state
     if [[ ! $SSH_CLIENT && $MAIL_HOST != $HOSTNAME ]]; then
       ps_char="@ $ps_char"
     fi