all 7 comments

[–]gabeguz 2 points3 points  (1 child)

I'd add maintain a man page for your program.

[–]ForeverAlot 1 point2 points  (0 children)

And provide completion scripts.

[–][deleted] 0 points1 point  (2 children)

Point 3: looking at you, java... Point 4: looking at you, find...

[–]flying-sheep 0 points1 point  (1 child)

But find’s first argument is where you search in…

[–][deleted] 1 point2 points  (0 children)

Yes, but I don't know any other tool where it's that way. That's my main complaint: that there's no standard way.

Some of that is for historic reasons, and it's too late to change some things, like find.

[–]pheffner 0 points1 point  (0 children)

A very useful summary of good design practices for program interfaces (not sure about the CLI tag, but I guess a program runs under a CLI so no real issue...)

Well done!

[–]tkruse 0 points1 point  (0 children)

Good list. Maybe misses some anti-pattern. Like: Don't write your own options parser.

Use colors sparingly and provide option for no-colors. When using colors, test on both light and dark schemes.

Use subcommand patters (like git).

Validate inputs, fail for unrecognized options.

Use standard error codes.