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
Jonas 'Sortie' Termansen
f3d1b9d0e4
Improve mv(1).
2014-10-21 16:11:17 +02:00
Jonas 'Sortie' Termansen
2492f0bad7
Fix how the shell appends.
2014-10-04 17:22:59 +02:00
Jonas 'Sortie' Termansen
12780c8eb0
Add env(1).
2014-09-25 18:20:00 +02:00
Jonas 'Sortie' Termansen
f84bfe5e89
Fix paste in editor not deleting the selection.
2014-09-25 17:49:01 +02:00
Jonas 'Sortie' Termansen
cbd46f610c
Fix init having its own poor vasprintf(3).
2014-08-23 21:47:04 +02:00
Jonas 'Sortie' Termansen
c451de1bc2
Fix uninitalized memory accesses in editor.
2014-08-23 21:26:17 +02:00
Jonas 'Sortie' Termansen
5f9da2a651
Fix format string problems in error(3) calls.
2014-08-23 21:04:39 +02:00
Jonas 'Sortie' Termansen
901467520f
Fix init using usleep instead of nanosleep.
2014-06-17 23:53:26 +02:00
Jonas 'Sortie' Termansen
6f35797e19
Fix editor not displaying an error when stdio is not a terminal.
2014-05-16 14:48:27 +02:00
Jonas 'Sortie' Termansen
812d071481
Fix buffer overflow in which(1).
2014-05-16 14:31:24 +02:00
Jonas 'Sortie' Termansen
4674017303
Fix editor writing NUL bytes to terminal.
2014-04-22 18:06:14 +02:00
Jonas 'Sortie' Termansen
c93a434749
Fix init not respecting the home directory from /etc/passwd.
2014-03-31 19:08:57 +02:00
Jonas 'Sortie' Termansen
b7bf21bfff
Open stdin, stdout and stderr in the kernel rather than init.
2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
e91cde379a
Rewrite getenv(3), setenv(3), unsetenv(3) and clearenv(3).
2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
687096ec8a
Add uname(3).
2014-03-17 19:22:11 +01:00