Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: rename flags to options #7170

Merged
merged 4 commits into from Apr 25, 2024
Merged

Conversation

grouville
Copy link
Member

@grouville grouville commented Apr 23, 2024

One of the action items discussed in #7107 (comment). It is the first one out of 3, discussed with Helder

Branched from #7143, which needs to be merged prior this one.

  1. Rename all the flag mentions to "options", as proposed by Helder in cli: de-clutter CLI #7107 (comment)
  2. Remove the automatic [flags] append on all commands: cli: de-clutter CLI #7107 (comment)

Update 04/24/2024

  • Removed the branch out from cli: conventionalize on <command> in cmd.Use #7143, as Helder suggested
  • Implemented comments discussed below:
    • Added <pattern> to add subcommand
    • Removed [options] from commands with just global flags.
    • Fix usage of watch command also (as it touched the "removed [options] from commands with just global flags)

@grouville grouville requested a review from helderco April 23, 2024 18:56
@grouville grouville force-pushed the cli-flags-option branch 2 times, most recently from dffad7e to a607434 Compare April 23, 2024 22:33
@helderco
Copy link
Contributor

Branched from #7143, which needs to be merged prior this one.

I would think you'd flip this, i.e., base the other one off of this one. That's because this one is much simpler to review and approve. The other one has room for interpretation and requires more discussion.

cmd/dagger/cloud.go Outdated Show resolved Hide resolved
cmd/dagger/config.go Outdated Show resolved Hide resolved
cmd/dagger/main.go Show resolved Hide resolved
cmd/dagger/main.go Outdated Show resolved Hide resolved
cmd/dagger/functions.go Outdated Show resolved Hide resolved
1. Rename all the flag mentions to "options", as proposed by Helder in dagger#7107 (comment)
2. Remove the automatic [flags] append on all commands: dagger#7107 (comment)
3. Set DisableFlagsInUseLine to true for AppendedSubcommands in dagger call

Signed-off-by: grouville <guillaume@dagger.io>
grouville added 2 commits April 24, 2024 15:33
- Remove the COMMAND copy-paste error, where a command is not required for the watch command
- Do not show the [options], as only inherited flags are shown

Signed-off-by: grouville <guillaume@dagger.io>
Do not show [options] for command with only inherited flags

Signed-off-by: grouville <guillaume@dagger.io>
Copy link
Contributor

@helderco helderco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the rename, let's continue on usage fixes in #7143

…ands

Applies the recommendations from Helder on those sub commands

Signed-off-by: grouville <guillaume@dagger.io>
@grouville grouville merged commit 0f504b6 into dagger:main Apr 25, 2024
41 of 44 checks passed
vikram-dagger pushed a commit to vikram-dagger/dagger that referenced this pull request May 3, 2024
* cli: rename flags to options

1. Rename all the flag mentions to "options", as proposed by Helder in dagger#7107 (comment)
2. Remove the automatic [flags] append on all commands: dagger#7107 (comment)
3. Set DisableFlagsInUseLine to true for AppendedSubcommands in dagger call

Signed-off-by: grouville <guillaume@dagger.io>

* cli: fix usage of watch command

- Remove the COMMAND copy-paste error, where a command is not required for the watch command
- Do not show the [options], as only inherited flags are shown

Signed-off-by: grouville <guillaume@dagger.io>

* cli: remove [options] for dagger version

Do not show [options] for command with only inherited flags

Signed-off-by: grouville <guillaume@dagger.io>

* cli: fix and add <pattern>... to config views add / set / remove commands

Applies the recommendations from Helder on those sub commands

Signed-off-by: grouville <guillaume@dagger.io>

---------

Signed-off-by: grouville <guillaume@dagger.io>
vikram-dagger pushed a commit to vikram-dagger/dagger that referenced this pull request May 3, 2024
* cli: rename flags to options

1. Rename all the flag mentions to "options", as proposed by Helder in dagger#7107 (comment)
2. Remove the automatic [flags] append on all commands: dagger#7107 (comment)
3. Set DisableFlagsInUseLine to true for AppendedSubcommands in dagger call

Signed-off-by: grouville <guillaume@dagger.io>

* cli: fix usage of watch command

- Remove the COMMAND copy-paste error, where a command is not required for the watch command
- Do not show the [options], as only inherited flags are shown

Signed-off-by: grouville <guillaume@dagger.io>

* cli: remove [options] for dagger version

Do not show [options] for command with only inherited flags

Signed-off-by: grouville <guillaume@dagger.io>

* cli: fix and add <pattern>... to config views add / set / remove commands

Applies the recommendations from Helder on those sub commands

Signed-off-by: grouville <guillaume@dagger.io>

---------

Signed-off-by: grouville <guillaume@dagger.io>
vikram-dagger pushed a commit to vikram-dagger/dagger that referenced this pull request May 3, 2024
* cli: rename flags to options

1. Rename all the flag mentions to "options", as proposed by Helder in dagger#7107 (comment)
2. Remove the automatic [flags] append on all commands: dagger#7107 (comment)
3. Set DisableFlagsInUseLine to true for AppendedSubcommands in dagger call

Signed-off-by: grouville <guillaume@dagger.io>

* cli: fix usage of watch command

- Remove the COMMAND copy-paste error, where a command is not required for the watch command
- Do not show the [options], as only inherited flags are shown

Signed-off-by: grouville <guillaume@dagger.io>

* cli: remove [options] for dagger version

Do not show [options] for command with only inherited flags

Signed-off-by: grouville <guillaume@dagger.io>

* cli: fix and add <pattern>... to config views add / set / remove commands

Applies the recommendations from Helder on those sub commands

Signed-off-by: grouville <guillaume@dagger.io>

---------

Signed-off-by: grouville <guillaume@dagger.io>
@helderco helderco mentioned this pull request May 6, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants