I have the following line:
echo -ne "\033]0;blah\007"
that correctly sets the term name to blah. But if I place that line within a function, as in:
setTermName()
{
echo -ne "\033]0;blah\007"
}
it doesn’t work anymore. I guess escape sequences are not treated correctly within the function. So my question could be reformulated as: How do you use escape sequences within a function?
I only want to be able to do setTermName foo from command line.
You invoke that echo command from interactive ksh also? Are you sure it understands
-ne? It’s not standard. Maybe useprintf.And you can try to use
aliasinstead.UPD: I’ve checked with AIX ksh, the following function worked: