dot/emacs: Sort fields and add braces as necessary in BibTeX records.
[profile] / dot / shell-rc
index 965e8ab..940f91b 100644 (file)
@@ -133,6 +133,7 @@ alias e="$EDITOR"
 alias svn="svnwrap svn"
 alias @="ssh"
 alias make="nice make"
+alias gdb="gdb -q"
 
 ###--------------------------------------------------------------------------
 ### Colour output.
@@ -163,6 +164,21 @@ alias egrep="greplike egrep"
 alias fgrep="greplike fgrep"
 alias zgrep="greplike zgrep"
 
+## Arrange for `diff' output to be in colour.
+export DIFF_COLORS="hd=1:ln=36:ad=32:de=31"
+difflike () {
+  local diff=$1; shift
+  if [ -t 1 ]; then
+    command $diff \
+           ${DIFF_COLORS+--color=always} \
+           ${DIFF_COLORS+--palette="$DIFF_COLORS"} \
+           "$@" | mdw-pager
+  else
+    command $diff "$@" | cat
+  fi
+}
+alias diff="difflike diff"
+
 ###--------------------------------------------------------------------------
 ### Other hacks.