[Toybox] [PATCH] ls: Ensure file names are separated by 2 spaces

Jarno Mäkipää jmakip87 at gmail.com
Tue Oct 29 23:58:20 PDT 2019


On Wed, Oct 30, 2019 at 1:08 AM Denys Nykula <nykula at ukr.net> wrote:
>
> > > be able to check "where is the cursor now" after
> > > operations, and maybe get a dump of the simulated screen output.
>
> Jarno, you could add vi an option that applies headlessly a key sequence
> from a file? For example, a regression test with it would catch this
> first line deletion error that I have now. Pretending the option exists:
>
> printf '\nseitan\n' >seitan; printf 'dd\n:wq!\n' >key
> vi -s key seitan; cat seitan
> # Want: seitan\n
> # Have: Segmentation fault

Hi Denys

Yeah this would be easiest way to do it. vi posix specification
already has -c option but that parsers ex commands. This visual mode
input keyfile could be handy, but Im not sure do I like to add
extensions before even completing posix level of functionality. But
things like this first line deletion seqfault that i introduced
probably 1 or 2 patches ago when rewriting delete operation really
motivates me having some sort of testing framework, and your solution
would be easiest to implement for now. I would just need to find
flagname that no common vi implementation uses yet.

>
> > That could be very handy for testing things like less, man and vi that
> > should perhaps eventually share drawing, movement and reg exp search
> > codebase...
>
> I don't install either more or less, and will be glad to not need either
> vim or a lynx wrapper, if you teach toy vi stdin. Other tools should
> just pipe to it. It's a case where reuse of entire command makes more
> sense than sharing a library function.

Yeah we just need -R option for viewonly and handling of stdin to
handle things like
cat file | vi -R -

-Jarno



More information about the Toybox mailing list