Get the latest tech news

The POSIX specification of vi


— screen-oriented (visual) display editor [UP] vi [-rR] [-c command] [-t tagstring] [-w size] [file...] This utility shall be provided on systems that both support the User Portability Utilities option and define the POSIX2_CHAR_TERM symbol. On other systems it is optional.

POSIX.1-2024 does not specify a standard behavior because there may be external issues, such as connection speed, the number of characters necessary to redraw as opposed to scroll, or terminal capabilities that implementations will have to accommodate. Implementations supporting this functionality are encouraged to base it on the tildedop edit option and handle the text regions and cursor positioning identically to the yank command. While a reasonable and unambiguous extension would be to permit the r command on empty lines, it would require that too large a count be adjusted to match the number of characters at or after the cursor for consistency, which is sufficiently different from historical practice to be avoided.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of POSIX

POSIX

Photo of POSIX specification

POSIX specification

Related news:

News photo

The curious case of shell commands, or how "this bug is required by POSIX" (2021)

News photo

In POSIX, you can theoretically use inode zero

News photo

Comparison of C/POSIX standard library implementations for Linux