Commit Graph

1505 Commits

Author SHA1 Message Date
sin
9de3546082 Implement nl -w width 2015-02-20 12:15:43 +00:00
sin
13e4231f4c Implement nl -v startnum 2015-02-20 12:05:54 +00:00
sin
028b0c206f Fix style
This broke sbase-box because it assumes that main(...) starts on
a separate line.
2015-02-20 10:24:11 +00:00
Evan Gates
76e6aacd60 Add initial find(1) implementation
No manpage yet.
2015-02-20 10:17:16 +00:00
Quentin Rameau
51b707e91e ls: add support for -p 2015-02-19 18:52:13 +00:00
FRIGN
d02327d0eb Get rid of the %Z-flag in strptime-format
We don't actually need it for Zulu-time and handroll it.
We can add the gmt-offset to hour without range-checking, because
the implementation will take care of it in mktime().
2015-02-19 19:27:17 +01:00
FRIGN
0f4192e6b2 Update usage and add actual d-parsing to touch(1) 2015-02-19 18:58:19 +01:00
FRIGN
14b1db88bf Correct error-handling in touch(1) 2015-02-19 18:56:59 +01:00
FRIGN
b00a00703f Add proper d- and t-flag support to touch(1)
except the [,frac], [.frac] respectively, but that's ok.
2015-02-19 18:54:56 +01:00
sin
c2b400bbd8 Fix touch usage in manpage 2015-02-19 15:35:22 +00:00
sin
c3d9bb8796 touch: Document that -d is unsupported 2015-02-19 15:31:28 +00:00
sin
737e805505 touch -t is also unwanted 2015-02-19 15:28:05 +00:00
sin
32791d3ca7 Mark touch -d as unwanted in the README 2015-02-19 15:27:03 +00:00
Quentin Rameau
7ddaf1d6fe uniq: corrected arg syntax in usage() 2015-02-19 14:57:09 +00:00
sin
0e008fe349 mv: Remove -i from usage and manpage 2015-02-19 14:56:02 +00:00
sin
8d53fc9a79 rm: Remove -i from usage and manpage
We do not support it so do not lie to the user.
2015-02-19 14:54:12 +00:00
Quentin Rameau
bf5f6a08a4 README: added options for date, ls, touch 2015-02-19 14:45:13 +00:00
sin
9355d88aae Add COLUMNS support to cols(1)
First attempt to see if COLUMNS is set, if that fails an ioctl()
is issued to find the width of the output device.  If that fails
as well, we default to 65 chars per line.
2015-02-19 11:25:51 +00:00
FRIGN
8c041cd115 Don't terminate du(1) if chdir(2) fails 2015-02-18 22:04:32 +01:00
sin
2137dfa334 Mark du(1) as finished in README 2015-02-18 20:43:46 +00:00
sin
d9085e9078 Update manpage for du(1) 2015-02-18 20:42:23 +00:00
sin
14b95b5f53 Mark du -x as done in the README 2015-02-18 20:41:37 +00:00
Quentin Rameau
593effc7c8 Add -x support for du(1) 2015-02-18 20:40:34 +00:00
sin
9d2b94dbb0 cp: Remove unnecessary comment
Not to mention that -d doesn't exist.
2015-02-18 17:08:52 +00:00
sin
e635760742 Fix ls when -q is not set
Use strdup() unconditionally.
2015-02-18 16:48:07 +00:00
sin
d40333e702 Fix ls -q UTF-8 parsing
Thanks FRIGN for the input.
2015-02-18 16:43:18 +00:00
sin
2a3f82a5cd Implement -u support for ls(1) 2015-02-18 16:29:46 +00:00
sin
9bd094193d Simplify ls -q implementation 2015-02-18 15:55:57 +00:00
sin
93cc2ecc5c du: Fix typo in manpage 2015-02-18 15:20:42 +00:00
FRIGN
a331ac3a03 Update LICENSE 2015-02-18 12:30:34 +01:00
FRIGN
767e36e410 sed(1): Add back line numbers to compiler error messages 2015-02-18 11:43:34 +01:00
FRIGN
4391984115 Use e-functions in sed(1)
and take off the tin-foil-head by removing checks for printf-return-
values.
2015-02-18 11:21:56 +01:00
FRIGN
a98405d277 Refactor sed(1) a bit
Well, isspacerune() has been fixed and some other FIXME's were also easy
to do.
There are some places where maybe some util-functions could be helpful.
In some cases, like for instance in regard to escape-sequences, I'm all
for consistency rather than adhering to the POSIX-standard too much.
Relying on centralized util-functions also makes it possible to keep
this consistency across the board.
2015-02-18 10:51:39 +01:00
FRIGN
6b719faade Add q-flag to ls(1)
of course, UTF-8-aware. ;)
2015-02-17 18:59:01 +01:00
FRIGN
ef23f966c5 Refactor strings(1) loop again
fixing a little out-of-bounds write.
2015-02-17 18:18:54 +01:00
FRIGN
439bf8a157 Fix small issue in strings(1) loop
It wouldn't print the len'th character.
2015-02-17 18:11:59 +01:00
sin
aa6ac30b81 chown: Update program usage and manpage 2015-02-17 16:41:58 +00:00
sin
16719ea6e1 cp: Update program usage and manpages
Do not document the non-standard -r flag as it is highly discouraged.
It is still silently accepted and treated the same as -R.
2015-02-17 16:14:42 +00:00
sin
6c31f1d2a8 du: Update usage and document -P as well 2015-02-17 16:14:31 +00:00
FRIGN
e5b5497773 Add UTF-8-support to strings(1), add t-flag and refactor code
Previously, the string-length was limited to BUFSIZ, which is an
obvious deficiency.
Now the buffer only needs to be as long as the user specifies the
minimal string length.
I added UTF-8-support, because that's how POSIX wants it and there
are cases where you need this. It doesn't add ELF-barf compared to
the previous implementation.
The t-flag is also pretty important for POSIX-compliance, so I added
it.
The only trouble previously was the a-flag, but given that POSIX
leaves undefined what the a-flag actually does, we set it as default
and don't care about parsing ELF-headers, which has already
turned out to be a security issue in GNU coreutils[0].

[0]: http://lcamtuf.blogspot.ro/2014/10/psa-dont-run-strings-on-untrusted-files.html
2015-02-17 17:04:36 +01:00
sin
949dafc171 strings: The default minimum length sequence is 4 characters not 6 2015-02-17 13:55:44 +00:00
sin
4904f26e5d strings: Remember to include limits.h for INT_MAX 2015-02-17 13:50:10 +00:00
sin
d8a89002d3 strings: Add -n len support 2015-02-17 13:46:48 +00:00
sin
8ce6d7091a strings: Default to -a 2015-02-17 13:40:36 +00:00
sin
9effb224c8 expand, unexpand: Minor style fix as per the suckless guide 2015-02-17 12:14:44 +00:00
sin
29be7a3f23 tar: Style fix 2015-02-17 09:13:15 +00:00
FRIGN
e77f0b0b9f Simplify sha*sum.c 2015-02-17 10:08:28 +01:00
FRIGN
8e016fad91 Make the tar(1)-header fixed again
This is clearer.
2015-02-16 20:01:33 +01:00
FRIGN
eb17f2cc9c Refactor tar(1) 2015-02-16 19:47:36 +01:00
FRIGN
bec3c32dbd Refactor ls(1) 2015-02-16 19:20:06 +01:00