Before this patch, commands containing %-signs set the title wrong
(urxvt and xterm) [1] and produce strange output in urxvt [2].
test for bug 1:
> sleep 10 && echo %
sets title to "sleep 10 && echo %<<"
> sleep 10 && echo %f
doesn't change the title at all
test for bug 2 (only urxvt):
> echo %f
39m%f
^^^^^----- output
Term window title and tab title are now skinable
Tab title can be different from window title (when supported by term)
Default theme is optimized of usuability (no %u@%m: $~ in a 10 char tab)
Cleanup code duplication and add comment for supported terms
On osX it works great on iterm, and is decent once you tweak Terminal pref
Tested under GNU screen, iTerm and Apple Terminal, need to be tested on linux
TODO implement Konsole support (via dbus)