Guest

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
download  |  raw  |  embed  |  report abuse
Copied
  1. if [ "$SHELL" = '/bin/sh' ]
  2. then
  3.   case $TERM in
  4.     msys|rxvt|*term)
  5.       set -o functrace
  6.       trap 'if [ -z "$FUNCNAME" ]; then echo -ne "\e]0;$MSYSTEM:${PWD/"$HOME"/~} - $BASH_COMMAND\007"; fi' DEBUG
  7.       # I'm using the git PS1 which auto-updates the title after command completion.
  8.     ;;
  9.   esac
  10. fi