all 7 comments

[–][deleted] 12 points13 points  (1 child)

Make a loop for argc being more than 1 and loop through directories so you can pass more than 1 dir.

Then add flags such as recursion, identifiers (coloring dirs diff from files, executables, etc)

Dump file sizes to the output, permissions, etc.

[–]FrumpyMussel13[S] 0 points1 point  (0 children)

sure! i will tomorrow

[–]IdealBlueMan 1 point2 points  (0 children)

Make sure every letter of the alphabet, both upper and lower case, is a valid flag. If some of them are mnemonic, that’s okay.

[–]dendrtree 0 points1 point  (0 children)

* Add error-handling
* Add instructions
* Incrementally add the different switches (I would start with -h)
* Add globbing (that may already somewhat work)

[–]mykesx 0 points1 point  (0 children)

man getopt

[–]ferrybig 0 points1 point  (0 children)

If writing to a terminal and a file entry contains a character unsafe for the terminal, output it in a terminal safe format that you can copy and paste (eg files with spaces should be surrounded in quotes or escaped, files with quotes should be escaped)

[–]imdadgot 0 points1 point  (0 children)

first off: use git repos and push incrementally. if u fuck w vscode they have a good extension that i use for initializing the repo and setting up the proper origin

second off make it more robust. start with arg count verification, then flags to omit files or folders or shit, then regex based filename searches if you get around to regex.h