X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/1a1af55ecea693d26834658af26ae096626adb4b..c68724aac78d1aaf86f79de51ba6dfbcf6b0e666:/dot/shell-rc diff --git a/dot/shell-rc b/dot/shell-rc index 9754106..940f91b 100644 --- a/dot/shell-rc +++ b/dot/shell-rc @@ -64,7 +64,7 @@ __mdw_set_prompt_pieces () { ## If this is an schroot environment or some other interesting augmented ## environment then point this out. hqual="$hqual${SCHROOT_CHROOT_NAME+/$SCHROOT_CHROOT_NAME}" - hqual="$hqual${MDW_BUILDENV+/$BUILDENV}" + hqual="$hqual${MDW_BUILDENV+/$MDW_BUILDENV}" ## Put together the main pieces. __mdw_prompt_left="$nl$bold$left$sec_l$u$host$hqual$sec_r$dir" @@ -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.