2 ms·
> -j -- generate output in JSON format (if applicable) The standard is -o --output flag for specifying a different format than plan plain text. I think that o
by yagizdegirmenci 5y ago
> -j -- generate output in JSON format (if applicable)
The standard is -o --output flag for specifying a different format than plan plain text.
I think that one important thing about writing consistent and powerful tools is having clear and remindable subcommands and flags, i feel like i'm writing a narrative when i'm working with Vault and AWS CLI, they are incredibly well designed.
- formerly_proven 5y agoIf the tool's main purpose is generating some specific file, then -o/--output should name that file or directory. If the tool generates some table-like output, then -o/--output usually allows changing what exactly is output. E.g. lsblk -o +model. For different output formats I've seen -f/--format {text,json,xml}, might be a bit verbose. --json is probably fine. Short version needed? Probably not.