Previously command-not-found(1) encoded all its suggestions in code.
This changes it to use a data table to make it easier to understand and
to modify with new suggestions.
b commonly corresponds to Page Up, and f is added to match.
j and k for lines, ^F and ^B for pages, and g and G for home/end are from vi.
C-n and C-p for lines and C-v and M-v for pages are from Emacs.
< and > for home/end allow using Emacs M-< and M->, tho they are from less(1).
POSIX allows <fcntl.h> to include <sys/stat.h>, but doesn't require it.
There's little reason to do that, since they are separate headers, and
<fcntl.h> just needs the mode_t constants. Fix the code accidentally
relying on <fcntl.h> including <sys/stat.h>. The mode_t constants are now
provided in their own kernel header <sortix/mode.h>.
Additionally fix <sys/stat.h> pulling in all of <sys/types.h>, which is not
allowed by POSIX, which only requires a few types to be declared. Fix the
code accidentally relying on <sys/stat.h> including <sys/types.h>.
Finally fix <dirent.h> pulling in <stdint.h> through <sortix/dirent.h>.
The <sortix/__/dt.h> and <sortix/__/stat.h> headers are no longer required
and their contents have been merged into <sortix/__/dirent.h>.
Fix -C disabling checking rather than checking quietly.
Fix sort(1) exiting 1 on certain errors, as POSIX requires sort(1) to only
exit if the input wasn't sorted when -c.
Fix -o opening the output file for truncation before all the input has been
read, as POSIX requires allowing -o to be an input file.
POSIX requires sort(1) to handle input errors by either erroring with no
output, or by erroring and sorting the input read so far. Change the current
behavior of continuing to the next file to simply failing hard on the first
input error.
Don't increment the last line number on the end of the standard input.
Report -c/-C as incompatible with -o.
Exit unsuccessfully on any output errors.
Update to current coding conventions and add documentation while here.
The commit 0def94568a switched to the box
drawing light vertical (U+2502) character, but did not fix the now wrong
assumption that the line drawing character encoded to a single byte.
roff(7) dictates that "Each sentence should terminate at the end of an
input line." Instead of doing this, Sortix manpages (incorrectly) used
double-spaces to separate sentences.
Additionally, fix a few small typos.
The console has gained these escape codes:
- Set color to any of 256 entries in the palette.
- Set color to any 24-bit RGB value.
- Inverse mode.
- Bold mode.
- Underline mode.
- Move cursor to line N.
- \a is now ignored.
The effectively unused ATTR_CHAR has been removed. Parsing of escape codes
has been improved. The graphical palette has been changed to the tango
colors, which makes Sortix look a bit differently. Some user-space programs
have been changed to use different colors that look better under the new
palette.
Remove const from methods that weren't really const and remove mutable
keyword workaround.
A new ioctl TIOCGDISPLAYS allow detecting which displays the terminal
has associated. The ability to set a keyboard layout can be detected
with tcgetblob kblayout.
Improve the user-space multi-monitor support while here.
The kernel now sets TERM rather than init(8).
This is a compatible ABI change riding on the previous commit's bump.
This change refactors the process group implementation and adds support
for sessions. The setsid(2) and getsid(2) system calls were added.
psctl(2) now has PSCTL_TTYNAME, which lets you get the name of a process's
terminal, and ps(1) now uses it.
The initial terminal is now called /dev/tty1.
/dev/tty is now a factory for the current terminal.
A global lock now protects the process hierarchy which makes it safe to
access other processes. This refactor removes potential vulnerabilities
and increases system robustness.
A number of terminal ioctls have been added.
This is a compatible ABI change.