title revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
ee5342a8882c2fc7631fcffb5497e6597747887cTim Reddehase# add to (+), delete from (-), set [=], or print (.) window title
5c4c13ac875d79def115ce3d8443d4ec87b3252aJulian Kornberger# arguments are eval'd before printing
ee5342a8882c2fc7631fcffb5497e6597747887cTim Reddehase# title text string exported in TITLE_TEXT
ee5342a8882c2fc7631fcffb5497e6597747887cTim Reddehasefunction title # [ + | - | = | . ] title ...
ee5342a8882c2fc7631fcffb5497e6597747887cTim Reddehase typeset x t="$TITLE_TEXT"
3df59f8f57e90e1667f4c31d77accbe2b4910c1cEugen Kuksa do case " $t " in
3df59f8f57e90e1667f4c31d77accbe2b4910c1cEugen Kuksa *" $x "*) ;;
3df59f8f57e90e1667f4c31d77accbe2b4910c1cEugen Kuksa " ") t=$x ;;
3df59f8f57e90e1667f4c31d77accbe2b4910c1cEugen Kuksa *) t="$t $x" ;;
3df59f8f57e90e1667f4c31d77accbe2b4910c1cEugen Kuksa $TITLE_TEXT) return 1 ;;
d62eba79f306957dd89ea9d3313600e98e2a8bebJulian Kornberger do case " $t " in
d62eba79f306957dd89ea9d3313600e98e2a8bebJulian Kornberger *" $x "*) t="${t%?( )$x*}${t##*$x?( )}" ;;
be6eb5d7ea1888f2f835fe0fff358f72572afeb4henning mueller $TITLE_TEXT) return 1 ;;