Commit graph

343 commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen
bc2f6842d1 Add -type option to find(1). 2016-03-27 14:51:44 +02:00
Jonas 'Sortie' Termansen
fe87b61a33 Add tagline. 2016-03-26 23:50:50 +01:00
Jonas 'Sortie' Termansen
2b72262b4f Relicense Sortix to the ISC license.
I hereby relicense all my work on Sortix under the ISC license as below.

All Sortix contributions by other people are already under this license,
are not substantial enough to be copyrightable, or have been removed.

All imported code from other projects is compatible with this license.

All GPL licensed code from other projects had previously been removed.

Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2016-03-05 22:21:50 +01:00
Jonas 'Sortie' Termansen
af40496ffb Convert utils to C. 2016-03-03 23:02:24 +01:00
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
Jonas 'Sortie' Termansen
d238518c35 Rewrite pager(1). 2014-12-27 23:43:39 +01:00
Jonas 'Sortie' Termansen
77cf804ed2 Move init to its own directory. 2014-12-26 21:48:15 +01:00
Jonas 'Sortie' Termansen
2abd0cf754 Add unmount(1). 2014-12-26 21:45:29 +01:00
Jonas 'Sortie' Termansen
e88a3ef654 Fix cp(1) error message. 2014-12-26 14:18:25 +01:00
Jonas 'Sortie' Termansen
08461c72fa Move editor to its own subdirectory. 2014-12-07 20:29:08 +01:00
Jonas 'Sortie' Termansen
d8df769692 Move sh to its own directory. 2014-12-07 18:25:09 +01:00
Jonas 'Sortie' Termansen
99f27d5eb1 Fix pwd(1) unsetting PWD and exit code. 2014-12-04 18:12:50 +01:00
Jonas 'Sortie' Termansen
4e9746c314 Add yes(1). 2014-12-03 15:20:03 +01:00
Jonas 'Sortie' Termansen
3ad7ab4fc3 Add gethostname(2) and sethostname(2). 2014-12-03 13:58:29 +01:00
Jonas 'Sortie' Termansen
d668c5558e Fix sprintf uses in sh. 2014-12-02 18:00:23 +01:00
Jonas 'Sortie' Termansen
bb3f591057 Add symbolic links. 2014-12-02 17:36:36 +01:00
Jonas 'Sortie' Termansen
2586685061 Ongoing build system maintainance. 2014-12-02 17:09:28 +01:00
Jonas 'Sortie' Termansen
2b2dd347ec Add symbolic link support to ls(1). 2014-12-02 16:28:46 +01:00
Jonas 'Sortie' Termansen
b1a2817ada Add symbolic link support to cp(1). 2014-12-02 16:28:46 +01:00
Jonas 'Sortie' Termansen
0dc951b94e Improve cp's install(1) emulation. 2014-12-01 23:34:43 +01:00
Jonas 'Sortie' Termansen
3d091f39bf Harden strcpy calls. 2014-11-30 19:53:42 +01:00
Jonas 'Sortie' Termansen
0329192ba8 Ignore unsupported cp --preserve option. 2014-11-30 16:09:01 +01:00
Jonas 'Sortie' Termansen
7482a13195 Rewrite column(1). 2014-11-27 20:55:34 +01:00
Jonas 'Sortie' Termansen
ba29cad8a3 Improve cp(1). 2014-11-27 01:36:52 +01:00
Jonas 'Sortie' Termansen
e5d07072f3 Set TERM=sortix in init. 2014-11-27 00:20:53 +01:00
Jonas 'Sortie' Termansen
0cd7fb6b76 Remove objtype environment variable from init. 2014-11-27 00:20:53 +01:00
Jonas 'Sortie' Termansen
91a1df02b1 Remove calc(1).
This program was mostly replaced with the standard expr(1) tool and the code
quality was not up to the standards. Finally, it was not very useful.
2014-11-26 23:34:14 +01:00
Jonas 'Sortie' Termansen
d56dcafd27 Add sleep(1). 2014-11-26 23:34:14 +01:00
Jonas 'Sortie' Termansen
99d1c61b24 Use a proper shell as sh(1) backend if available. 2014-11-26 21:41:09 +01:00
Jonas 'Sortie' Termansen
f8c5adf20f Add #! support to execve(2). 2014-11-26 21:14:13 +01:00
Jonas 'Sortie' Termansen
3577cb81fe Improve execvpe(3) logic and run shell on ENOEXEC. 2014-11-25 23:52:12 +01:00
Jonas 'Sortie' Termansen
a334ede4c4 Rewrite ls(1). 2014-11-25 18:53:31 +01:00
Jonas 'Sortie' Termansen
87be32b948 Remove obsolete uninstall Makefile target from projects. 2014-11-24 21:32:24 +01:00
Jonas 'Sortie' Termansen
a7cf2c4b36 Add unicode support to editor(1). 2014-11-24 17:41:26 +01:00
Jonas 'Sortie' Termansen
9e6148f6ff Refactor default compiler options logic. 2014-11-24 17:10:50 +01:00
Jonas 'Sortie' Termansen
fbbb33287b Implement standard library feature macros. 2014-11-20 21:09:14 +01:00
Jonas 'Sortie' Termansen
d2cea190a8 Remove DEFAULT_STUFF environmental variable from init(1). 2014-11-20 21:09:14 +01:00
Jonas 'Sortie' Termansen
e9b81ccaa5 Rewrite chvideomode(1). 2014-11-19 00:08:49 +01:00
Jonas 'Sortie' Termansen
c2f9c0bb12 Remove --usage options from shell utilities in favor of --help. 2014-11-18 20:29:18 +01:00
Jonas 'Sortie' Termansen
c5fa54aa08 Use fmemopen(3) internally in sh(1). 2014-11-17 19:18:16 +01:00
Jonas 'Sortie' Termansen
d7e1c926a2 Run command-not-found in sh only if errno is ENOENT. 2014-11-17 16:23:02 +01:00
Jonas 'Sortie' Termansen
2697711dc1 Add tr(1). 2014-11-17 16:23:02 +01:00
Jonas 'Sortie' Termansen
760f21c670 Add dirname(1). 2014-11-01 21:33:49 +01:00
Jonas 'Sortie' Termansen
94bc05307a Add basename(1). 2014-11-01 21:33:48 +01:00
Jonas 'Sortie' Termansen
af66244bd6 Add uniq(1). 2014-11-01 20:58:13 +01:00
Jonas 'Sortie' Termansen
9f9af783d9 Add sort(1). 2014-11-01 17:26:13 +01:00
Jonas 'Sortie' Termansen
2f9e2e4e9d Add expr(1). 2014-11-01 16:55:19 +01:00
Jonas 'Sortie' Termansen
3ca139b4c2 Add chmod(1). 2014-10-28 20:16:51 +01:00
Jonas 'Sortie' Termansen
d8a66ac86f Add -t option to ls(1). 2014-10-21 16:11:17 +02:00
Jonas 'Sortie' Termansen
05a124467e Add -i option to ls(1). 2014-10-21 16:11:17 +02:00
Jonas 'Sortie' Termansen
2194bdb8b9 Add -d option to ls(1). 2014-10-21 16:11:17 +02:00