shopt -s globstar
-# inside emcas fixes
+# inside emacs fixes
if [[ $RLC_INSIDE_EMACS ]]; then
# EMACS is used by bash on startup, but we dont need it anymore.
# plus I hit a bug in a makefile which inherited it
fi
+# emacs has a different default search path than the info command. This
+# adds the info defaults to emacs, but not the reverse, because I dun
+# care much about the cli. The search path is only on the cli if you run
+# "info xxx", or in emacs if you run '(info xxx)', so not that
+# important, but might as well fix it.
+
+# info info says this path is what was compiled, and its not documented
+# anywhere. Through source grepping, i found it in filesys.h of the info
+# source in trisquel flidas.
+#
+# Traling : means for emacs to add its own stuff on to the end.
+
+export INFOPATH=$PATH:/usr/local/info:/usr/info:/usr/local/lib/info:/usr/lib/info:/usr/local/gnu/info:/usr/local/gnu/lib/info:/usr/gnu/info:/usr/gnu/lib/info:/opt/gnu/info:/usr/share/info:/usr/share/lib/info:/usr/local/share/info:/usr/local/share/lib/info:/usr/gnu/lib/emacs/info:/usr/local/gnu/lib/emacs/info:/usr/local/lib/emacs/info:/usr/local/emacs/info:.:
if [[ $- == *i* ]]; then
# for readline-complete.el
if [[ $KONSOLE_PROFILE_NAME ]]; then
TERM=xterm-256color
- fi
+ fi
# todo: not sure this works in sakura
#stty werase undef
# 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
bbk() {
c /
local active=true
- if systemctl is-active btrbk.service; then
- echo "cron btrbk is already running"
- return 1
- fi
systemctl is-active btrbk.timer || active=false
if $active; then
ser disable btrbk.timer
fi
+ if systemctl is-active btrbk.service; then
+ $active && ser enable btrbk.timer
+ echo "cron btrbk is already running"
+ return 1
+ fi
# run latest
install-my-scripts
- if ! btrbk-run "$@" && $active; then
- ser enable btrbk.timer
- fi
+ btrbk-run "$@"
+ $active && ser enable btrbk.timer
}
bfg() { java -jar /a/opt/bfg-1.12.14.jar "$@"; }
}
- o() {
- if type gvfs-open &> /dev/null ; then
- gvfs-open "$@"
- else
- xdg-open "$@"
- fi
- # another alternative is run-mailcap
- }
+o() {
+ if type gvfs-open &> /dev/null ; then
+ gvfs-open "$@"
+ else
+ xdg-open "$@"
+ fi
+ # another alternative is run-mailcap
+}
ipdrop() {
s iptables -A INPUT -s $1 -j DROP
ssh $1 /tmp/${2##*/} "${@:2}"
}
+ssh() {
+ BASH_LOGIN_SHELL=true command ssh "$@"
+}
sss() { # ssh solo
ssh -oControlMaster=no -oControlPath=/ "$@"
}
# 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
+ c ~/sieve; cp personal{test,}.sieve; cp lists{test,}.sieve; cp personalend{test,}.sieve
+ _dosieve ~/sieve/main.sieve -eW ${1:-INBOX} delete
}
# mail related
case $return in
- 0) ps_color="$(get_term_color blue)"
+ 0) ps_color="$(get_term_color purple)"
ps_char='\$'
;;
1) ps_color="$(get_term_color green)"
if [[ -e /nocow/btrfs-stale ]] && ((`command ls -AUq /nocow/btrfs-stale|wc -l`)); then
ps_char="! $ps_char"
fi
+ if test -e /m/md/bounces/new/*; then
+ ps_char='!BOUNCE! '"$ps_char"
+ fi
+ if [[ -e /nocow/user/mailtest-failure ]]; then
+ ps_char='!MAILPING! '"$ps_char"
+ fi
+ source /a/bin/bash_unpublished/source-state
if [[ ! $SSH_CLIENT && $MAIL_HOST != $HOSTNAME ]]; then
ps_char="@ $ps_char"
fi