Summary:ASTERISK-10292: [patch] CLI clear command
Reporter:Atis Lezdins (atis)Labels:
Date Opened:2007-09-13 10:39:06Date Closed:2007-10-26 11:19:50
Versions:Frequency of
Environment:Attachments:( 0) asterisk.c.patch
Description:I created a small patch, to clear CLI output. Works the same way as shell's clear.
Comments:By: Atis Lezdins (atis) 2007-09-13 10:46:19

Please let me know - if you would like to see it as separate function (and also - what name it should be).

For now changes are trivial.

By: Russell Bryant (russell) 2007-09-13 13:23:35

Hm, I always just used "!clear"  :)

By: Jason Parker (jparker) 2007-09-13 15:10:39

I suspect that this is done via editline, similar to ^W.

We'll see when the license gets approved :D

By: Eliel Sardanons (eliel) 2007-09-13 17:40:20

I think you can do that more easily with CTRL+L ?

By: Jason Parker (jparker) 2007-09-13 17:44:17

If the terminal supports ^L.  His patch is 319 bytes - I suspect I know what it'll look like already.

By: Atis Lezdins (atis) 2007-09-14 04:04:09

Ok, i didn't knew that Ctrl+L works. qwell - you're probably right - it's two lines in remoteconsolehandler. However, probably a lot of users don't know about Ctrl+L - it could still be usefull - if you find the code matching your standards.

By: Tilghman Lesher (tilghman) 2007-10-26 11:13:23

This is not the right way to send a screen clear.  Notably, it will only work for vt100 compatible terminals.  The right way to do this is to use termcap to determine the correct sequence and send that.

By: Atis Lezdins (atis) 2007-10-26 11:18:00

Ok, as my C skills are limited - i won't be able to do it correctly. You may close the issue, if this doesn't fit in.