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
-HISTIGNORE='k *; *'
+# but meh. dunno why, but just " *" does glob expansion, so use [ ] to avoid it.
+HISTIGNORE='k *:[ ]*'
export BC_LINE_LENGTH=0
done < <(find "$@" -print0);
}
+faf() { # find all files
+ find $@ -type f
+}
+
+fastboot() { /home/ian/Android/Sdk/platform-tools/fastboot "$@"; }
ff() {
if type -P firefox &>/dev/null; then
echo
}
+hrcat() { local f; for f; do [[ -f $f ]] || continue; hr; echo "$f"; cat "$f"; done }
+
i() { git "$@"; }
# modified from ~/local/bin/git-completion.bash
grep -Il "" "$@" &>/dev/null
}
+jtail() {
+ journalctl -f "$@" | grep -Evi "^(\S+\s+){4}(sudo|ovpn|sshd|cron)"
+}
+
l() {
if [[ $PWD == /[iap] ]]; then
}
rlu() { # [OPTS] HOST PATH
- # eg rlu -opts frodo testpath
+ # eg rlu -opts frodo /testpath
# useful for selectively sending dirs which have been synced with unison,
# where the path is the same on both hosts.
opts=("${@:1:$#-2}") # 1 to last -2
prompt_command() {
local return=$? # this MUST COME FIRST
- local psc pst
- local ps_char ps_color
+ local psc pst ps_char ps_color stale_subvol
unset IFS
history -a # save history
+
+ # for titlebar
if [[ ! $DESKTOP_SESSION == xmonad && $TERM == *(screen*|xterm*|rxvt*) ]]; then
# from the screen man page
if [[ $TERM == screen* ]]; then
echo -ne "$title_escape${PWD/#$HOME/~} $USER@$HOSTNAME\007"
fi
+
case $return in
0) ps_color="$(get_term_color blue)"
ps_char='\$'
ps_color="$(get_term_color bold green)"
fi
fi
+ # I would set nullglob, but bash has had bugs where that
+ # doesn't work if not in top level.
+ if ((`ls -AUq /nocow/btrfs-stale|wc -l`)); then
+ ps_char="! $ps_char"
+ fi
PS1="${PS1%"${PS1#*[wW]}"} \[$ps_color\]$ps_char\[$(get_term_color nocolor)\] "
# emacs completion doesn't like the git prompt atm, so disabling it.
#PS1="${PS1%"${PS1#*[wW]}"}$(__git_ps1 ' (%s)') \[$ps_color\]$ps_char\[$(get_term_color nocolor)\] "