Can we divide our terminal in multiple sections

basically I was looking for a way to split the terminal into two different sections using my program where I can have seperate output for two different section, just like when we have the output during the installation of our package using apt apt install any-package

is there any crate or way of achieving this

In this case, I think you could use the crossterm command api to send ansi control codes to stdout on your terminal. These control codes allow you to move the cursor to a new location, clear lines, print in color, scroll, etc...

If the UI becomes more complicated than a bottom-line status bar, you could look at a tui library to handle your case.

AFAIK, crossterm and tui are both Windows compatible, with the latter running on the former.

1 Like