Open vincentbernat opened 2 years ago
I have added a second commit removing some escape codes that I get when running admin commands.
OK, it took me some time, but it now works. I have removed the last commit since I am doing everything in clogin now. I am also filtering out the ANSI escape sequences to move the cursor. The --More--
prompt can also appear at the end of the line (I suppose this is some ncurses smartness).
When using "admin show ...", the "more" prompt is in reverse video. It is not possible to disable it with "terminal length 0" when running as a read-only user (dunno why exactly, it works with a fully privileged user).
^[[7m--More--^[[27m
^[[7m(END)^[[27m
Catch them both. We do not require to start at the beginning because "(END)" prompt can replace the "--More--" prompt without displaying any new line.