Closed bill88t closed 2 years ago
Since we don't have any form of curses (the library) it should consider a fixed number as the page. I guess something like 20 lines or something
Would it be interesting to start a "man" command ? I could try, I have the idea it could read from the Manual.txt and display the corresponding text.
Example:
man cd cd [DIR]... CHANGES TO SPECIFIED DIRECTORY
Well that too would be great, but page sized prints would also be kinda necessary for logging. If you feel like implementing man, go ahead.
I try this issue and propose a pull request to see if I understand correctly what is asked. I go for pages of hardcoded 20 lines
cat -n 4 README.md page 4 - line 60 to 80 60 line 61 line 62 line [...] 80 line
Hmm, that's not what I meant.
An example also for hardcoded 20 lines:
cat -n README.md
1 line
2 line
...
19 line
20 line
Press any key to continue.. (user presses any key)
21 line
22 line
...
39 line
40 line
EOF
(...
implies the lines in between)
We could make it so it checks if the next argument after -n
is a number so that it changes the count of lines per page.
If it's not a number, it's the filename.
Ok thanks I understand, if a number is not given then 20 lines by default. Ok I will try something.
But now I think about it, cat is a concatenation command. What you are talking about isn't it the more/less commands ?
Yea basically, I forgot those existed. This issue is a big wontfix then, as the more/less commands should be implemented.
It would be useful to provide such functionality, in order to be able to print large files (like the Manual for example) from within ljinux