• thingsiplay@lemmy.ml
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      edit-2
      2 hours ago

      TUI: Terminal Text User Interface, something like htop in example. CLI: Command Line Interface, something like grep in example.

      Edit: “Text” is probably the correct word, not “Terminal”.

      • Ferk@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        3 hours ago

        Isn’t the T for “text”? (ie. “Text User Interface”)

        I mean, in the context of Unix systems it’s most likely gonna be within a terminal emulator, but in theory you can have a TUI inside an SDL window rendering the text there (specially when they are ports from other systems where they might be using different character sets than whats available in terminals… or if they want to force a specific font).

        The only example that comes to my head right now is ZZT, but I believe there are many games on Steam that use a TUI rendered within their own program, not a terminal.

    • pnelego@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      9 hours ago

      It’s a UI that sits in the terminal (thus TUI). Think htop, or btop; They are often ran from CLI, but offer more of a UI.

      • Levi@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 hours ago

        Thanks! I guess something like vim would count as a TUI then.

        • Hawke@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          3 hours ago

          I’d say vi is in a fuzzy grey area below a tui. It’s more than a cli but shares a lot with cli programs; it pretty much has its own command line built in. At the same time it has nothing like dialog box or menus like normal tui programs.

          • Ferk@lemmy.ml
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            2 hours ago

            Personally, I feel that if it uses control characters to update the screen in previous positions, altering the scroll buffer, moving beyond where the cursor is and redrawing the screen, then it’s a TUI.

            CLI programs only output plain text in a stream, using just control characters for coloring and formatting, and if they do any re-drawing it’s only for the current line (eg. progressbars and so).

            So… even something like less is a TUI program… but things like more or sed would be CLI programs.

        • thingsiplay@lemmy.ml
          link
          fedilink
          arrow-up
          4
          ·
          7 hours ago

          Yes. Think of any terminal application with an interactive user interface, that mimics a GUI. Something that is not just controlled by commandline options like grep and sed in example.