News for hackers. Stuff that matters.
Re:Shell Script Best Practices, from a decade of scripting t... by ilyt on Thursday October 27, 2022 @09:11AM (#33356953)
> The order of commandline args shouldn't matter.

Ugh I've seen so many (bash and non bash) cmdline tools that made it utterly annoying like that

The special place in hell goes to people who force users to write

    cmd help subcmd
instead of

    cmd subcmd --help
or ones that do not allow doing say

    cmd subcmd --verbose
because "verbose is global and doesn't belong to subcmd`

or ones where you need to write

    cmd --option1 subcmd --option2 subsubcomd --option3
and need to jump all over the cmdline if you want to add some option after previous invocation

and if you go "well but the option for command and subcommand might have same name" DONT NAME THEM THE SAME, that's just confusing people and search results.

There are no comments on this comment yet.