Drake
e16bee31d5
`rm`/Makefile: add `rm`.
...
another gamer added to the ranks of the esports team.
supports recursive deletion of directories.
3 years ago
Drake
19d0be3cf0
`ls`: move width checking to before filename printing.
...
this matches gnu/posix `ls` more (maybe?).
also it looks better imo
3 years ago
Drake
e8412ff491
`ls`/file.h: run `clang-format`.
...
the "i need a pre-commit hook" curse strikes again.
3 years ago
Drake
1567e63152
`cat`/file.h: move `concatFileToStdout` func to file.h.
...
another thing i figure may be somewhat needed.
3 years ago
Drake
42e3204429
`ls`/checks.h: move `startsWith*` functions to header.
...
i figure these'll be useful in other programs, so might as well go ahead and add them.
3 years ago
Drake
6f27014976
`cat`: remove pointless checking after running concatFileToStdout.
...
it didn't even seem to work properly anyways.
3 years ago
Drake
54b63951e9
Makefile: bump version.
3 years ago
Drake
55a4447206
Makefile: add copyright declation to `DRAKECU_VERSION`.
...
now is shown in --version and --help messages.
3 years ago
Drake
2f14fffd5c
All: add license comment.
...
also: change ansi implementation to be slightly less copyright-infringing.
3 years ago
Drake
323845a4f4
Create LICENSE
3 years ago
Drake
becfc95d17
Makefile: bump version.
3 years ago
Drake
75be2b920a
`cat`: allow concatenating multiple files.
...
previously the `concatenating` in the help message meant concatenating to stdout :p
3 years ago
Drake
3779dcae13
Makefile: bump version.
...
it's time, bois.
3 years ago
Drake
4a2bc64ca5
`ls`: update help message.
...
added example usage, --width docs, and cwd note.
3 years ago
Drake
9b124c9cfb
`cat`/Makefile: add `cat`.
...
i thought this would be alot harder to implement, lol.
supports reading from stdin (including pipes) and files.
big dab moment.
3 years ago
Drake
48745708cc
`ls`: add error checking when expanding `..`s.
...
so apparently it was realpath causing this, not opendir.
me big dum.
3 years ago
Drake
f42b88fad5
`ls`: add --width.
...
you do not know the pain i went through to implement this.
3 years ago
Drake
136b84d019
`ls`: run `clang-format`.
...
i should setup a pre-commit hook for this, lol.
3 years ago
Drake
1bc13fb62c
`ls`: fix segfault when being ran in a directory without any files.
3 years ago
Drake
fba399a85e
`ls`: remove uneeded comment.
...
went along with one of the unremoved functions ig.
3 years ago
Drake
11d32b9dfb
All: add newline to version output.
...
goddammit, i apparently missed a bunch of stuff after some of the reforms i've done.
3 years ago
Drake
6c83c9a5e3
Merge branch 'master' of github.com:Ruthenic/drakecoreutils
3 years ago
Drake
0e82f67cb5
Makefile: sort $PROGS.
...
was beginning to annoy me the way it was (adding them depending on the order they were made in) so i changed it.
3 years ago
Drake
15d15f2501
Create release action
3 years ago
Drake
b9c91c3e5f
ansi-colour.h/file.h: run `clang-format`.
...
whoops, forgot to do this the first time around.
also uses llvm format.
3 years ago
Drake
1ee035fe27
All: run `clang-format` on code and makefile.
...
C source files use LLVM style, Makefile uses Google style.
3 years ago
Drake
d97207065f
All: remove uneeded imports, according to include-what-you-use.
...
see https://github.com/include-what-you-use/include-what-you-use for more info on iwyu.
3 years ago
Drake
a63c36b02b
Makefile: move quotes for version def to compiler line.
3 years ago
Drake
a839c81518
`ls` and file.h: massive ls function cleanup.
...
moved file functions (isRegularFile, isDirectory, isSymlink) into file.h.
commented out printBool, as it should only be needed when debugging.
made remaining function static.
3 years ago
Drake
005327533e
`uname`: add typecast to fix `-Wextra` warning.
3 years ago
Drake
23bc854b51
`whoami`: revert "`whoami`: misc improvements, including...".
...
This reverts commit 8a2afdc33a
.
so apparently `getlogin()` returns the user the process is running under, and when it is called when you are in a sudoed bash, it returns the login username instead of root.
as you may be able to guess, that is not exactly intended behaviour.
3 years ago
Drake
9eb02a4954
`ls`: fix output on prompts without newline at beginning.
...
i *swore* i fixed this (and i did for other programs) but i guess this one just escaped my mind.
very sad.
3 years ago
Drake
4813fd8c0c
`ls`: make -C directly modify maxLen instead of an intermediary boolean.
...
i've no idea why i didnt do this in the first place, lol
3 years ago
Drake
0a059278c7
All: switch version declaration using header to makefile.
...
makes imports a little cleaner
3 years ago
Drake
4b3f1c5b64
Makefile: massively reworked makefile.
...
Created a more "correct" makefile (actually uses targets based on files, made targets that needed to be phony, etc)
Removed verbose target, as it didn't really make any sense when debug exists.
Probably a few other things.
3 years ago
Drake
46533cbd31
version.h: bump version.
3 years ago
Drake
47e3afdbcc
Makefile: make install target respect $DESTDIR.
3 years ago
Drake
6f7a4dc21f
Makefile: add install target.
...
PLEASE DO NOT INSTALL THIS
IT WILL OVERWRITE YOUR MAIN COREUTILS
AND IT WILL KILL ITSELF GUARANTEED
3 years ago
Drake
e53132d905
`version.h`: bump version.
...
I feel there have been enough big changes that I can safely bump the version! 🥳
also, yes the versioning system has changed
its called, we do a little bit of trolling :trollface:
3 years ago
Drake
cecdc7bf59
`yes`: better help message, specified messages.
3 years ago
Drake
ad50aae020
TODO.md: remove ls todo, add yes todo
3 years ago
Drake
5bc4b66dd0
`ls`: add green highlighting for symlinks
...
fun fact: github copilot helped me with this :)
3 years ago
Drake
f47adb1aba
gitignore: remove *all* .vscode files.
3 years ago
Drake
d3182b059e
`ls`: change spacing, fix too many newlines.
3 years ago
Drake
e95295b804
gitignore: add vscode settings
3 years ago
Drake
1b77d46614
`uname`: add missing semicolon in new printf.
3 years ago
Drake
87a07a5dc2
all (but `yes`): re-add `\n`s to new `printf()`s
...
okay so apparently they're needed
3 years ago
Drake
47191b070d
TODO.md: remove todo for fixing clang.
3 years ago
Drake
9c217c5a2c
.gitignore: add a.out
3 years ago
Drake
01f7d53d15
all (but `yes`): use printf formatting
...
clang no longer complains!
3 years ago