4 ms·
> I've only _once_ in my life encountered a tool that didn't have `--help` support Never heard of echo? What do you expect this to do? echo --help
by enriquto 2y ago
> I've only _once_ in my life encountered a tool that didn't have `--help` support
Never heard of echo? What do you expect this to do?
echo --help
- jancsika 2y agodisplay the help message and exit https://www.man7.org/linux/man-pages/man1/echo.1.html https://www.man7.org/linux/man-pages/man1/echo.1.html
- blueflow 2y ago$ echo --help --help $ type echo echo is a shell builtin
- ninalanyon 2y agoI expect /usr/bin/echo to respond like this: Usage: /usr/bin/echo [SHORT-OPTION]... [STRING]... or: /usr/bin/echo LONG-OPTION Echo the STRING(s) to standard output. -n do not output the trailing newline etc. Were you thinking of the Bash builtin?
- enriquto 2y agoI don't expect any such ugly shit. A call to echo should print its arguments, no exceptions. NAME echo - echo arguments SYNOPSIS echo [ arg ... ] DESCRIPTION Echo writes its arguments in order as a line on the standard output file. It is mainly useful for producing diagnostics in command files.
- scubbo 2y agoExceptions to rules cause mental overhead and maintenance headaches. Why should `echo` be the single solitary tool that responds differently to invocation with `--help`?
- enriquto 2y agoLet me play the uno reverse card: why should "--help" be the single solitary string that echo does not print like the others?
- scubbo 2y agoFor two reasons, both related to the Principle of Least Astonishment: * Because the likelihood that someone entering `echo --help` _actually_ wants to print `--help` is staggeringly low * Because it's not the "single solitary string" that has special handling - `echo -n` does not print `-n`. `echo` already supports flags, and so it would be most-consistent and least-surprising for it to also support a standard default one