That's a terminal-specific feature, originally an escape sequence in xterm (1999, documented in ctlseqs.ms but not mentioned in changes) and later (2011) implemented as an extension for Linux console and the corresponding terminal description. The terminal database lists it as a "miscellaneous extension".
Currently, these terminal descriptions have the feature:
- linux3.0 (the current default for "linux")
- putty
- xterm+basic (a building block used in most "xterm" variants)
Whether it is supported in xterm look-alikes such as VTE would have to be answered by testing (there is no useful documentation for VTE or Konsole).
If you prefer to not use the extension, you could remove the E3 capability from the terminal description which you use, e.g.,
infocmp -1x >foo edit foo, removing the line with "E3=" tic -x foo I suggested using the options -1 and -x to simplify the formatting and to show the feature to change. The example given in https://ghostbin.com/paste/kfsbj is consistent with that advice:
- the pathname
/home/flowerpick/.terminfo/x/xtermwould be used by ncurses - the capabilities
AXandXTare extended capabilities (likeE3), shown with the-xoption.
If you are using more than one terminal type, you would have to do this for each (value of $TERM), and the change only applies to the machine where you run clear. The first couple of lines of the infocmp output show which one you are working on:
# Reconstructed via infocmp from file: /home/flowerpick/.terminfo/x/xterm xterm|xterm terminal emulator (X Window System), For instance, uxrvt sets $TERM to something like rxvt-unicode, producing lines like this in infocmp:
# Reconstructed via infocmp from file: /lib/terminfo/r/rxvt-unicode rxvt-unicode|rxvt-unicode terminal (X Window System), The st program uses xterm (or possibly xterm-256color), though it's been a while since I saw a copy of that which worked well enough to comment upon.