Uses the VT100 method of clearing the line from the cursor position to the
end of the line: Esc-0K
(closes issue #17160)
Reported by: coolmig
Patches:
20100531__issue17160.diff.txt uploaded by tilghman (license 14)
Tested by: coolmig
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266585
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
/* Write over the CLI prompt */
if (!ast_opt_exec && !lastpos) {
- if (write(STDOUT_FILENO, "\r", 1) < 0) {
+ if (write(STDOUT_FILENO, "\r\e[0K", 5) < 0) {
}
}
if (write(STDOUT_FILENO, buf, res) < 0) {