[PATCH] vi: avoid touching a new file with ZZ when no editing has been done

Yousong Zhou yszhou4tech at gmail.com
Mon Feb 20 14:16:13 UTC 2017


On 20 February 2017 at 20:24, Kang-Che Sung <explorer09 at gmail.com> wrote:
> On Mon, Feb 20, 2017 at 7:58 PM, Yousong Zhou <yszhou4tech at gmail.com> wrote:
>> Well, I guess :x and ZZ are different since the early days of busybox
>> vi: it's the case with 1.20.0 and 1.22.1.  The case with ZZ is more
>> substantial both as a regression and as a flaw even when looking it
>> alone without comparison with the standard vim.
>
> :x and ZZ are equivalent as defined by POSIX.

Yes, the POSIX standard says so.  The git history says :x was
introduced into busybox vi as an alias of :wq in commit
a71389bfe8b7a047ef6da555f274d124318977c9.

I think the focus is now more about should can we apply the patch in
this thread first, or should I fix them in a single commit if we
intend to fix :x to comply with the POSIX standard?

                yousong


More information about the busybox mailing list