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

optional support n headlines, that alway visible at top of screen #212

Open
jaegdi opened this issue Jun 21, 2024 · 5 comments
Open

optional support n headlines, that alway visible at top of screen #212

jaegdi opened this issue Jun 21, 2024 · 5 comments

Comments

@jaegdi
Copy link

jaegdi commented Jun 21, 2024

Hi,
at first: great job and i like moar.
i'm unhappy, that my go skill is not so good, that i can implement that by myself an send a pull request.

I often have long output that has on the fist n lines a header.
It would be nice, if moar can support this by an optional parameter like eg. -headlines=3. Then the fist 3 lines are always on the top of the screen and the other lines a scrolling (like in excel with fixed rows)

best regards

@walles
Copy link
Owner

walles commented Jun 22, 2024

Just out of curiosity, what kind of output is this?

@jaegdi
Copy link
Author

jaegdi commented Jun 26, 2024

For example, when i ask the openshift/kubernetes cluster for list all pods with node
eg.: oc get pod -o wide
then the output has several columns and the first line is a headerline. when i use less as pager and i scroll down, then the headerline disapear and it would be much nicer, to have an pager, who let the headline fix in the top line of the screen and scroll/page all the data lines below.

@jaegdi
Copy link
Author

jaegdi commented Jun 26, 2024

for example this output

NAMESPACE                                          NAME                                                              READY   STATUS             RESTARTS         AGE     IP              NODE                        NOMINATED NODE   READINESS GATES
aps-build                                          aps-ad1e901d2651afebab68f1bc00e160d1eca45b55db8929bfd345c90-pod   0/1     Completed          0                2d8h    10.129.15.168   cid-scp0-inf-v08.sf-rz.de   <none>           <none>
aps-build                                          aps-ad2f6546c68f2267cbd4cdaaf33174284eaccbe0fcfe922a59344f6-pod   0/1     Completed          0                6d10h   10.129.14.114   cid-scp0-inf-v08.sf-rz.de   <none>           <none>
aps-build                                          aps-ad4e6b41e5972414f26627ae8b66822a30c08a7d24bff7ea730efde-pod   0/1     Completed          0                6d14h   10.129.15.162   cid-scp0-inf-v08.sf-rz.de   <none>           <none>
aps-build                                          aps-ad66bbda4f9b558064418a5f9113d072d9d4b574355b43b5fe6d04c-pod   0/1     Completed          0                5d14h   10.129.15.78    cid-scp0-inf-v08.sf-rz.de   <none>           <none>
...

but with hundrets of lines and i like to see always the first line with the headings when i scroll down.

This kind of output is typical for the output of system commands and in a cluster environment the output often has several hundret lines and many "columns" with very similar data, so it is difficult to interpret the data without a visible headline.

@walles
Copy link
Owner

walles commented Jun 27, 2024

Do you have any examples with more than one header line?

@jaegdi
Copy link
Author

jaegdi commented Jul 15, 2024

Sorry for the delay. I was in vacation.
here an example, where the first 3 lines should be fixed at top:
headline-example.txt

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

No branches or pull requests

2 participants