News for hackers. Stuff that matters.
Re:Command Line Interface Guidelines by azemetre on Tuesday February 06, 2024 @04:37PM (#39281010)
Do you have an example of a CLT that has a dry run flag? I am very confused on how to design one for some CLTs I'm making.

If you call an API to retrieve data, how can that be a dry run? Are you suppose to give fake examples with fake output?

Re:Command Line Interface Guidelines by scbrg on Tuesday February 06, 2024 @09:09PM (#39283618)
apt-get. It simply tells you what it's going to remove/install.

Calling an API to retrieve data is not really the type of program that requires a dry-run flag. It's mainly useful for commands that change the state of something in ways that could potentially be destructive, unwanted and/or hard to revert.

Re:Command Line Interface Guidelines by amake on Wednesday February 07, 2024 @12:25AM (#39284834)
The AWS CLI has --[no]-dry-run in many of its subcommands.

https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-h...

Re:Command Line Interface Guidelines by funcDropShadow on Wednesday February 07, 2024 @06:53AM (#39287423)
make has -n or --dry-run. But originally it was called -n and that has been used many cli tools.