Clarify command descriptions when no arguments are taken #496

Merged
6543 merged 5 commits from noerw/tea:fix-483-2 into main 2022-09-13 18:14:03 +00:00
Member

This changes the command help string from eg

NAME:
   tea label create - Create a label

USAGE:
   tea label [command options] [arguments...]

to

NAME:
   tea label create - Create a label

USAGE:
   tea label [command options]

Hopefully improving usability.


edit: this also changes tea release create to take the --tag flag value optionally via the first argument, as this seems to be a clear UX improvement.

fixes #483

This changes the command help string from eg ``` NAME: tea label create - Create a label USAGE: tea label [command options] [arguments...] ``` to ``` NAME: tea label create - Create a label USAGE: tea label [command options] ``` Hopefully improving usability. --- edit: this also changes `tea release create` to take the `--tag` flag value optionally via the first argument, as this seems to be a clear UX improvement. fixes #483
noerw added this to the v0.9.0 milestone 2022-08-26 15:43:21 +00:00
noerw added the
kind/docs
kind
enhancement
labels 2022-08-26 15:43:21 +00:00
noerw added 2 commits 2022-08-26 15:43:22 +00:00
noerw added 1 commit 2022-08-26 15:58:04 +00:00
Merge branch 'main' into fix-483-2
Some checks failed
continuous-integration/drone/pr Build is failing
05e9facca1
noerw added 1 commit 2022-09-13 15:41:07 +00:00
fix lint
All checks were successful
continuous-integration/drone/pr Build is passing
8cd9da42c7
techknowlogick approved these changes 2022-09-13 16:51:01 +00:00
6543 approved these changes 2022-09-13 17:53:48 +00:00
6543 added 1 commit 2022-09-13 17:53:59 +00:00
Merge branch 'main' into fix-483-2
All checks were successful
continuous-integration/drone/pr Build is passing
ce56f79e6d
delvh reviewed 2022-09-13 18:08:12 +00:00
@ -19,6 +19,7 @@ var CmdIssuesCreate = cli.Command{
Aliases: []string{"c"},
Usage: "Create an issue on repository",
Description: `Create an issue on repository`,
ArgsUsage: " ", // command does not accept arguments
Owner

Why not empty string?

Why not empty string?
Owner

that would be the default value and we would have the behavior form before

that would be the default value and we would have the behavior form before
delvh marked this conversation as resolved
@ -67,1 +68,4 @@
tag := ctx.String("tag")
if cmd.Args().Present() {
if len(tag) != 0 {
Owner

Wouldn't it be better to only error when --tag <t1> != <t2>?

Wouldn't it be better to only error when `--tag <t1>` != `<t2>`?
Owner

no I would error to "educate the users"

no I would error to "educate the users"
delvh marked this conversation as resolved
delvh approved these changes 2022-09-13 18:11:57 +00:00
6543 merged commit 5e7c702e07 into main 2022-09-13 18:14:03 +00:00
6543 deleted branch fix-483-2 2022-09-13 18:14:03 +00:00
Sign in to join this conversation.
No description provided.