← Back to context

Comment by JdeBP

1 day ago

Indeed, the TERM environment variable actually is the configuration of "nearly any program" (excluding the ones that aren't doing explicitly terminal I/O, of course, and the bad ones that just ignore TERM and make assumptions). Set TERM wrongly, and one has set the configuration incorrectly for a whole load of programs, in one fell swoop.

Well, not “nearly any program”; I believe that probing for capabilities is the preferred method these days.

  • I shall merely smile knowingly and tell you that no, it isn't, and you should try that with a broad range of actual terminals and terminal emulators. (-:

    • If you would like to productively add some input, I'd certainly welcome it. I like to learn more about this space. My own experience of course includes various terminal emulators with unset or unsupported TERMs. Of course I have of course experienced breakage.

      Please note that I didn't say few or no programs use TERM. Rather, I mildly disagreed about "nearly any program," and pointed out that there are more robust alternatives to TERM.

      Especially when it comes to greenfield development, it's not clear to me why anyone would use TERM rather than capabilities. In any case, I always try to leverage caps whenever I can.