Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Error in vi (or in man page)
In article <d2bf99a6-c369-f7ae-fb98-6101626a8874%rk.phys.keio.ac.jp@localhost>,
Rin Okuyama <rokuyama%rk.phys.keio.ac.jp@localhost> wrote:
>Hi,
>
>On 2018/09/14 8:49, Paul Goyette wrote:
>> Current vi(1) man page says
>>
>>    -r    Recover the specified files, or, if no files are specified,
>>           list the files that could be recovered. If no
>recoverable
>> Â Â Â Â Â Â Â Â Â Â files by the specified name exist, the file is
>edited as if
>> Â Â Â Â Â Â Â Â Â Â the -r option had not been specified.
>>
>> However, in actuality, if no recoverable files by the specified name
>> exist, vi simply reports that fact, and does nothing;Â it does not
>> edit the file "as if the -r option had not been specified."
>>
>> Â Â Â #Â ls kern_time_50.c
>> Â Â Â kern_time_50.c
>> Â Â Â # vi -r kern_time_50.c
>> Â Â Â No files named kern_time_50.c, readable by you, to recover
>> Â Â Â #
>
>POSIX says
>http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html
>
>> If the -r option was specified, ... If no recovery information
>> about a file is available, an informational message to this effect
>> shall be written, and the edit shall proceed as usual.
>
>This seems consistent with our manpage.
>
>On the other hand, /usr/ucb/vi from Solaris 11 (based on Bill Joy's vi)
>behaves strangely; if no recovery information is present, it allocate
>an empty buffer even if there's a file of the specified name!
>
>It would be better to fix our vi in accordance with POSIX. Thoughts?
I think it is better to keep the behavior (exit) and fix the man page.
vim exits too. It is usually the case that the user does not want to
edit the file with the same name!
christos
Home |
Main Index |
Thread Index |
Old Index