haussli / rancid

RANCiD
Other
114 stars 42 forks source link

clogin.in: catch More prompts for IOS-XR in admin mode #34

Open vincentbernat opened 2 years ago

vincentbernat commented 2 years ago

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).

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.

vincentbernat commented 2 years ago

I have added a second commit removing some escape codes that I get when running admin commands.

vincentbernat commented 2 years ago

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).