2 ms·
I think it's very user friendly. As a user I can easily access functionality when the application's modules are organized as a little taxonomy of commands. Hier
by matheusmoreira 3y ago
I think it's very user friendly. As a user I can easily access functionality when the application's modules are organized as a little taxonomy of commands. Hierarchy is good.
> Among other things it makes the shell’s ! commands harder to use.
How so?
- swozey 3y agoI write a lot of tui/cli apps and I've never even considered doing sub commands. I always do --my-action-1 and --my-action-2. I can't think of any huge positives from using subcommands. I know for a fact that that will take longer to write and add some complexity to --args-* and I also feel like getting a quick --help option would be a lot more cumbersome. Maybe a good way there is to list commands then tabbed/dashed indented under the root command list its subcommands.
- gbalduzzi 3y agoI like that sub-commands usually have a different --help output git --help git add --help The former returns general information about the whole git executable, while the latter returns specific details about the add command. It also gives an immediate intuition of entering a whole different flow that can not be composed with other flows, something that you don't have with --args There is a hierarchy between commands and options that is not expressed when both use the -- syntax
- gumby 3y agoI answered a similar question above; here’s the link to my comment, with examples: https://news.ycombinator.com/item?id=38975420 https://news.ycombinator.com/item?id=38975420