Article View: net.bugs
Article #466In vi, ZZ is not :wq
From: Al Filipski
Date: Fri, 13 Sep 1985 20:53
Date: Fri, 13 Sep 1985 20:53
34 lines
1430 bytes
1430 bytes
*
In "Re: Re: Vi isn't nasty enough, so user looses lines", there is the
exchange:
>
> > ZZ is shorthand for :wq
> > :wq means write it out & quit
>
> ZZ is shorthand for :x<CR>
>
ZZ is NOT equivalent to either :wq or :x on our System V.2 vi,
but differs from the latter two (which seem to be equivalent) in
an insidious way. For example, for an existing file foo,
vi foo
<change some things>
:w bar
ZZ
does NOT cause the changes to be written to foo. However,
vi foo
<change some things>
:w bar
:wq
DOES. ZZ apparently tries to be smart and avoid unnecessary writes,
but I would expect it to write the file being edited in the case
above. A bug, I'd call it.
--------------------------------
Alan Filipski, UNIX group, Motorola Microsystems, Tempe, AZ U.S.A
{seismo|ihnp4}!ut-sally!oakhill!mot!al
ucbvax!arizona!asuvax!mot!al
--------------------------------
Technical Details
Message-ID:
<269@mot.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utcs!mnetor!mot!alReferences:
<2073@ukma.UUCP> <153@chinet.UUCP>, <572@baylor.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site mot.UUCP Path: arc1-ca.pugleaf.net!utzoo!utcs!mnetor!mot!al From: al@mot.UUCP (Al Filipski) Newsgroups: net.bugs Subject: In vi, ZZ is not :wq Message-ID: <269@mot.UUCP> Date: Fri, 13-Sep-85 16:53:06 EDT Article-I.D.: mot.269 Posted: Fri Sep 13 16:53:06 1985 Date-Received: Fri, 13-Sep-85 20:24:34 EDT References: <2073@ukma.UUCP> <153@chinet.UUCP>, <572@baylor.UUCP> Organization: Motorola Microsystems, Phoenix AZ Lines: 34