An strace shows the following "write" syscalls responsible for this behaviour:
write(2, "\r\33[01;[EMAIL PROTECTED]:\33[01;34m~\33[00m$ \r\33[01;[EMAIL PROTECTED]:\33[01;34m~\33[00m$ echo -n foo\r\33[01;[EMAIL PROTECTED]:\33[01;34m~\33[00m$ \r\33[01;[EMAIL PROTECTED]:\33[01;34m~\33[00m$ echo -n foo", 190) = 190 write(2, "\n", 1) = 1 write(1, "foo", 3) = 3 write(1, "\33]0;[EMAIL PROTECTED]: ~\7", 19) = 19 write(2, "\33[01;[EMAIL PROTECTED]:\33[01;34m~\33[00m$ \r\33[01;[EMAIL PROTECTED]:\33[01;34m~\33[00m$ ", 83) = 83 Why are some things written to fd 1 and other to fd 2? And why does it output the (color) prompt two or four times? -- "echo -n" doesn't work correctly with a color prompt https://launchpad.net/bugs/80576 -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
