tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Moving virecover to ~/

On Sat, Nov 11, 2017 at 2:26 AM, Robert Elz <> wrote:

> andromeda$ vi -r
> Wed Oct 18 22:37:28 2017: eval.c
> Thu Oct 19 16:59:28 2017: jobs.c
> Those are two source files from sh ... I can see from that when I was
> editing them last (probably a suspended vi when the system shut down.)
> What I don't know is which copy (or copies) of sh they're from, I have
> more than a dozen.   Knowing the full path names of the files would
> help (nb: not the $PWD of the vi at the time, I often edit one shell's
> sources while in the directory containing a different version.)

/* resend from the right mail address */

If I understand you correctly, what you need is
actually $PWD, because the filenames will not
clash if being edited under different directories.

  ~/devel/nvi2> vi -r
  Sun Nov 12 16:04:38 2017: common/msg.h
  Sun Nov 12 16:05:27 2017: /home/lichray/devel/nvi-devel/common/msg.h

I edited both files from the same directory, same
vi session, where the 2nd file is opened with :N .
What vi recovery recorded is not the basename, but
the (expended) filename you *used* to open that file.

Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.

Home | Main Index | Thread Index | Old Index