Search code examples
textterminalconsoleansi-escapestrikethrough

Is it possible to display text in a console with a strike-through effect?


I have already looked into ANSI escape codes, but it looks like only underlining is supported.

Do I miss something or is there another option?

If it is not possible, is there something equivalent in the meaning of "this is deprecated"?


Solution

  • According to the ECMA-48 standard for terminals, SGR (Select Graphic Rendition) code number 9 is supposed to enable crossed-out text. However, the ANSI escape code wikipedia page says that it's not widely supported, and I'm not aware of any that do. I'd suspect that's because DEC's VTxxx series didn't support it.