cli icon indicating copy to clipboard operation
cli copied to clipboard

Do we need default Usage for root command?

Open teghnet opened this issue 7 months ago • 2 comments

Hi, I was wondering if the default command_setup.go:33

	if cmd.Usage == "" && isRoot {
		tracef("setting default Usage (cmd=%[1]q)", cmd.Name)
		cmd.Usage = "A new cli application"
	}

is really needed.

Would you accept a PR that removes it?

The default name makes a lot of sense, but the actual usage can be empty - sometimes root commands to not have flags, and then we need to put a space ( ) in the Usage field.

teghnet avatar May 18 '25 13:05 teghnet

@teghnet any reason you are not using v3 ? v2 is in maintenance mode

dearchap avatar May 18 '25 13:05 dearchap

This is v3 @dearchap

teghnet avatar May 20 '25 21:05 teghnet