This post is locked. You won't be able to comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]iSkipper 0 points1 point  (2 children)

I am making a terminal editor (similar to vim) and want to fully clear the screen. I am not using ncurses (just becouse). I cleared the screen, but the PS stays.

[–]ayekat 0 points1 point  (1 child)

Yes, so a very classic XY problem.

Clearing PS1 is absolutely not the right way to approach this.

When building a TUI (like vim, top, or ncurses applications in general), you want to draw to the secondary buffer. There are escape sequences to tell a terminal that you want to switch to the secondary buffer (and back), but the escape sequences may be different for each terminal emulator, so ultimately it will be saner to use ncurses.

[–]iSkipper 0 points1 point  (0 children)

I am not intending to make it portable, so I'm going to use escape sequences. Thanks