Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linescrolling not work #509

Open
khromenokroman opened this issue Apr 9, 2024 · 3 comments
Open

linescrolling not work #509

khromenokroman opened this issue Apr 9, 2024 · 3 comments
Labels

Comments

@khromenokroman
Copy link

Hello, please tell me, I need to output an array of strings to the terminal, which are many and which are long, can I somehow use less for example? or just more? if only more, how do I make it so that I can scroll sideways, I tried to set the CLICON_CLI_LINESCROLLING parameter to 1, but it didn't help me, I can't scroll sideways, I need your help. I tried to output data using cligen_output(), but it didn't help either, if there are a lot of lines, then it includes more and I can only scroll up and down, but I can't left and right :((


extern "C" int test_print([[maybe_unused]]clixon_handle handle, [[maybe_unused]]cvec *cvv, [[maybe_unused]]cvec *argv) {
 
    for (int i=0;i!=10000;i++){
        cligen_output(stdout,"ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\n");
    }
    return 0;
}

output:

ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
@olofhagsand
Copy link
Member

CLICON_CLI_LINESCROLLING is for INPUT handling. I.e. a long command that wraps. If set to 1 it side-scrolls, if 0 it wraps.
Your example is output.
Output scrolling using cligen_output() uses line-scroling aka more.

@khromenokroman
Copy link
Author

CLICON_CLI_LINESCROLLING is for INPUT handling. I.e. a long command that wraps. If set to 1 it side-scrolls, if 0 it wraps. Your example is output. Output scrolling using cligen_output() uses line-scroling aka more.

more has scrolling to the side if the line is too long, do I understand correctly that I can't do that here?

@olofhagsand
Copy link
Member

In my ubuntu more does line wrapping. I was unaware of a more that does scrolling to the side?
clixon_cli does line wrapping if the line is too long:

olof@zoomie> show configuration
<services xmlns="http://clicon.org/control
ler">
   <ssh-users xmlns="http://clicon.org/ssh
-users">
   ...
<more>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants