On Thursday, March 21st, 2024 at 15:53, Rob Landley <[email protected]> wrote:
> I note that "more" is from the days of daisy wheel teletypes, and was thus
> designed to work ok without a tty or interaction through cursor keys (you can
> export $COLUMNS and $LINES or just let it guess 80x25), and "less" requires a
> tty and cursor keys. This might make "more" a better fit for on-screen
> keyboards
> that don't provide cursor keys. (Or not...)
less supports vi keys (hjkl), and all the keybindings of more. less doesn't
require
cursor keys in the same way vi doesn't, it's just how it's more commonly used.
> I would like to have one implementation sharing code. Implementing "less -R"
> cuts the behavior delta between the two, and having an option to let ctrl-c
> exit
> less (instead of just killing the rest of the pipeline) probably gets us close
> enough we to handwave the rest?
There is less -K and less -E (exit on C-c and exit at EOF respectively),
so more_main would look something like:
void more_main(void)
{
toys.optflags |= FLAG_E|FLAG_K|FLAG_R;
less_main();
}
Once we have a good enough less.
- Oliver Webb <[email protected]>
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net