logoalt Hacker News

cocoto • today at 7:33 AM • 3 replies • view on HN

> The du options are: s to summarize and b to display bytes.

Small nitpick: Use long options and your code samples become self explanatory!


Replies

zetanor • today at 11:20 AM

On the flip side, not everyone uses GNU coreutils (though I do on every machine that runs Git), and I wouldn't have been confident that "du -c" and "du --total" are fully interchangeable prior to reading the manual just now. For Git, he could have confidently used "git --message" instead of "git -m", but then again, I'm sure it would have surprised many Git users ("is that -m?").

analog_daddy • today at 9:29 AM

This is one of my biggest pet peeves! I hate reading shell scripts which uses small options. It is okay to use short options when interactively using shell, but there is no excuse to not spend time and try converting a small options shell script to use long options if its going to be read by someone else, especially if you anyway have to write comments explaining it. The biggest part i hate is that, some utilities don’t have long option counterpart!

NetOpWibby • today at 8:05 AM

I always use long options when possible. I don’t need terseness, computers do. I wanna help future me figure out how to run something.