Commit Graph

289 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen 01b59c1947 Convert libc to C. 2016-03-03 23:02:23 +01:00
Jonas 'Sortie' Termansen d472818380 Fix pager(1) bugs. 2016-02-24 23:55:34 +01:00
Alexandros Alexandrou 77129524eb Add touch(1). 2016-02-24 17:32:05 +01:00
Jonas 'Sortie' Termansen 70687ac610 Add passwd(1). 2016-02-06 17:12:30 +01:00
Jonas 'Sortie' Termansen 9a1786f688 Add login(8). 2016-02-06 00:52:52 +01:00
Jonas 'Sortie' Termansen b37a679c72 Add -f to cp(1). 2016-02-01 01:45:12 +01:00
Jonas 'Sortie' Termansen bd14553a0f Add df(1). 2016-01-27 21:36:04 +01:00
Jonas 'Sortie' Termansen d1777d7afd Add extfs and unmount suggestions to command-not-found(1). 2016-01-26 22:11:12 +01:00
Jonas 'Sortie' Termansen 0c7d1fe2c1 Add -m support to mkdir(1). 2016-01-26 21:55:40 +01:00
Jonas 'Sortie' Termansen 794cfd057a Add keyboard number selection to chvideomode(1). 2016-01-26 21:17:09 +01:00
Jonas 'Sortie' Termansen 5ba7ce6802 Add backwards support to pager(1). 2016-01-26 21:17:09 +01:00
Jonas 'Sortie' Termansen 2e4b15daed Simplify directory reading. 2016-01-26 18:42:54 +01:00
Jonas 'Sortie' Termansen 328f4e1fd6 Add features to ls(1) and fix implementation issues.
New options:

  -1   Disable columnizing.

  -c   Sort by file status change time.

  -C   Column directory entries.

  -h   Show file sizes with magnitude suffixes such as 42.3K.

  -r   Sort entries in the opposite order.

  -R   Recursively list directory contents.

  -S   Sort by file size in decreasing order.

  -u   Sort by access time.

  --color=always|auto|never
       Control whether colorizing is enabled.

The output is now natively columnized instead of running a column(1)
subprocess. Multiple operands are now implemented correctly (directory
contents are columned separately rather than their concatenation, the name
of each directory is printed prior to its content, ...). The file owner and
group names are now shown rather than a hard-coded root. Long listings are
now properly aligned. Mixing file and directory operands works correctly
now. Columnizing is now vertical rather than across. Clean up the source
code and remove cruft. Stat information on directory entries are read once
only now, which which fixes an incosistent sort race condition when sorting
according to lstat. Move to the openat paradigm.
2016-01-26 17:45:06 +01:00
Jonas 'Sortie' Termansen 4839a97d91 Add colormake support for cc and c++. 2016-01-25 17:42:26 +01:00
Jonas 'Sortie' Termansen ba5af691f9 Add find(1) symbolic link support. 2016-01-25 17:42:25 +01:00
Jonas 'Sortie' Termansen 4333b2e695 Add ln(1) target directory support. 2016-01-25 17:42:25 +01:00
Jonas 'Sortie' Termansen f3e3c98084 Fix ls realloc loop. 2016-01-08 00:47:14 +01:00
Jonas 'Sortie' Termansen 8b52c0d818 Fix wrong type in calloc sizeof. 2016-01-08 00:46:44 +01:00
Jonas 'Sortie' Termansen fad73ab3e1 Fix broken unknown short option reporting. 2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen 1e7bbace90 Fix uninitialized variable in chvideomode option parsing. 2015-12-23 17:22:41 +01:00
Jonas 'Sortie' Termansen 8274981a81 Add chkblayout(1). 2015-12-19 02:49:37 +01:00
Jonas 'Sortie' Termansen 75808c637d Add regex(3). 2015-12-17 23:32:43 +01:00
Jonas 'Sortie' Termansen fd5a850e48 Use signal handlers in time(1) instead of process groups. 2015-12-12 19:28:08 +01:00
Jonas 'Sortie' Termansen 7d10c4caaa Add pager(1) -rR options. 2015-12-12 19:28:08 +01:00
Jonas 'Sortie' Termansen 9d6bd9b830 Add stat(1). 2015-12-12 19:28:07 +01:00
Jonas 'Sortie' Termansen 6dce46c081 Add pstree(1). 2015-12-12 19:28:07 +01:00
Jonas 'Sortie' Termansen 416c87aed9 Add ps(1). 2015-12-12 19:28:07 +01:00
Jonas 'Sortie' Termansen 67af95c7ee Update command line parsing to current coding conventions. 2015-12-12 19:28:07 +01:00
Jonas 'Sortie' Termansen 4e918687ce Add kill(1). 2015-12-12 19:28:07 +01:00
Jonas 'Sortie' Termansen cf5c2706b3 Fix unintended extra fork in chroot(1). 2015-12-12 16:53:42 +01:00
Jonas 'Sortie' Termansen 15fd58b6a0 Fix tr buffer overrun and shadowed delete array. 2015-12-12 16:53:42 +01:00
Jonas 'Sortie' Termansen 54b80263a2 Add -d option to chroot(1). 2015-10-28 20:13:37 +01:00
Jonas 'Sortie' Termansen 6138e94124 Fix colormake not resetting color. 2015-10-06 00:36:17 +02:00
Jonas 'Sortie' Termansen a5d050fc49 Add realpath(1). 2015-10-01 22:50:51 +02:00
Jonas 'Sortie' Termansen 8f8ead93f1 Add id(1). 2015-08-26 21:35:11 +02:00
Jonas 'Sortie' Termansen 00f3e97cf7 Replace userland perror calls. 2015-08-26 18:10:24 +02:00
Jonas 'Sortie' Termansen b180a14412 Add mktemp(1). 2015-08-26 17:49:28 +02:00
Jonas 'Sortie' Termansen d7b1dce054 Dumb down echo(1).
Options and escape sequences are fatally incompatible with historic echo
that has no room for such extensions. Instead they pose risk because it is
harder to use echo on unvalidated input safely and because any further
extensions potentially break existing scripts. Use printf(1) instead.
2015-08-22 00:44:39 +02:00
Jonas 'Sortie' Termansen ef45218660 Add S_ISGID and S_ISUID.
I originally left them out because Sortix doesn't have setuid and setgid
executable support, but this created considerable compatibility issues and
it is better to supply them as the mode bits still exist and can be set.
2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen 840c8e6b02 Fix pager double prompt if paging during special character. 2015-08-14 17:26:07 +02:00
Jonas 'Sortie' Termansen ec38222f9b Fix head(1) and tail(1) directory handling. 2015-08-11 15:57:55 +02:00
Jonas 'Sortie' Termansen c81610f7a3 Fix du counting block devices. 2015-06-27 17:06:43 +02:00
Jonas 'Sortie' Termansen 40594eba1c Fix sort(1) reverse sort not working. 2015-06-27 17:06:43 +02:00
Jonas 'Sortie' Termansen 1d7c157848 Fix ls closing stdout twice. 2015-05-15 16:18:41 +02:00
Jonas 'Sortie' Termansen f3e4be0d83 Fix getdelim(3). 2015-05-15 16:18:40 +02:00
Jonas 'Sortie' Termansen f384fcdff1 Run time(1) children in their own process group. 2015-02-08 22:58:32 +01:00
Jonas 'Sortie' Termansen e76d4a90c5 Silence maybe initialized warning in pager. 2015-02-06 14:55:35 +01:00
Jonas 'Sortie' Termansen ab66b91086 Fix NOTO typo. 2014-12-28 20:18:58 +01:00
Jonas 'Sortie' Termansen a4ee2e3724 Add space as an alias for page down in pager(1). 2014-12-28 20:18:58 +01:00
Jonas 'Sortie' Termansen 9c2f89d56c Work around a getdelim bug in column(1). 2014-12-28 20:18:58 +01:00