On Sat, Oct 29, 2016 at 08:42:12PM +0200, Laslo Hunhold wrote:
On Fri, 28 Oct 2016 14:40:01 +0200
Klemens Nanni <[email protected]> wrote:
Returning -1 upon a valid invocation like 'dwm -v' is just wrong.
I agree, but we should get rid of this EXIT_* stuff altogether.
My proposal:
if (argc == 2 && !strcmp("-v", argv[1])) {
fputs("dwm-"VERSION, stdout);
return 0;
} else if (argc != 1)
die("usage: dwm [-v]");
What do you guys think about it?
I'm used to seeing/printing version information on stderr as it's more
of a debug information than normal output.
EXIT_* aren't really needed imho either.