
show command in caption w/o breaking tab-completion
By: a guest on Nov 2nd, 2010 | syntax:
Bash | size: 0.31 KB | hits: 98 | expires: Never
if [ "$SHELL" = '/bin/sh' ]
then
case $TERM in
msys|rxvt|*term)
set -o functrace
trap 'if [ -z "$FUNCNAME" ]; then echo -ne "\e]0;$MSYSTEM:${PWD/"$HOME"/~} - $BASH_COMMAND\007"; fi' DEBUG
# I'm using the git PS1 which auto-updates the title after command completion.
;;
esac
fi