Skip to content

[polish] Ensure all helptext is consistent #1716

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

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/boxcli/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func loginCmd() *cobra.Command {
func logoutCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "logout",
Short: "logout from devbox",
Short: "Logout from devbox",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
c, err := auth.NewClient(build.Issuer(), build.ClientID(), scopes)
Expand Down
4 changes: 2 additions & 2 deletions internal/boxcli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ func runCmd() *cobra.Command {
flags.envFlag.register(command)
flags.config.register(command)
command.Flags().BoolVar(
&flags.pure, "pure", false, "If this flag is specified, devbox runs the script in an isolated environment inheriting almost no variables from the current environment. A few variables, in particular HOME, USER and DISPLAY, are retained.")
&flags.pure, "pure", false, "if this flag is specified, devbox runs the script in an isolated environment inheriting almost no variables from the current environment. A few variables, in particular HOME, USER and DISPLAY, are retained.")
command.Flags().BoolVarP(
&flags.listScripts, "list", "l", false, "List all scripts defined in devbox.json")
&flags.listScripts, "list", "l", false, "list all scripts defined in devbox.json")

command.ValidArgs = listScripts(command, flags)

Expand Down
11 changes: 5 additions & 6 deletions internal/boxcli/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ func (flags *serviceUpFlags) register(cmd *cobra.Command) {
"compose-file.yaml|yml. Default is directory containing devbox.json",
)
cmd.Flags().BoolVarP(
&flags.background, "background", "b", false, "Run service in background")
&flags.background, "background", "b", false, "run service in background")
}

func (flags *serviceStopFlags) register(cmd *cobra.Command) {
cmd.Flags().BoolVar(
&flags.allProjects, "all-projects", false, "Stop all running services across all your projects.\nThis flag cannot be used simultaneously with the [services] argument")
&flags.allProjects, "all-projects", false, "stop all running services across all your projects.\nThis flag cannot be used simultaneously with the [services] argument")
}

func servicesCmd(persistentPreRunE ...cobraFunc) *cobra.Command {
Expand Down Expand Up @@ -86,9 +86,8 @@ func servicesCmd(persistentPreRunE ...cobraFunc) *cobra.Command {
stopCommand := &cobra.Command{
Use: "stop [service]...",
Aliases: []string{"down"},
Short: `Stop one or more services in the current project. If no service is specified,
stops all services in the current project.`,
Long: `Stop one or more services in the current project. If no service is specified, stops all services in the current project. \nIf the --all-projects flag is specified, stops all running services across all your projects. This flag cannot be used with [service] arguments.`,
Short: `Stop one or more services in the current project. If no service is specified, stops all services in the current project.`,
Long: `Stop one or more services in the current project. If no service is specified, stops all services in the current project. \nIf the --all-projects flag is specified, stops all running services across all your projects. This flag cannot be used with [service] arguments.`,
RunE: func(cmd *cobra.Command, args []string) error {
return stopServices(cmd, args, flags, serviceStopFlags)
},
Expand Down Expand Up @@ -116,7 +115,7 @@ func servicesCmd(persistentPreRunE ...cobraFunc) *cobra.Command {
&flags.runInCurrentShell,
"run-in-current-shell",
false,
"Run the command in the current shell instead of a new shell",
"run the command in the current shell instead of a new shell",
)
servicesCommand.Flag("run-in-current-shell").Hidden = true
serviceUpFlags.register(upCommand)
Expand Down
2 changes: 1 addition & 1 deletion internal/boxcli/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func shellCmd() *cobra.Command {
command.Flags().BoolVar(
&flags.printEnv, "print-env", false, "print script to setup shell environment")
command.Flags().BoolVar(
&flags.pure, "pure", false, "If this flag is specified, devbox creates an isolated shell inheriting almost no variables from the current environment. A few variables, in particular HOME, USER and DISPLAY, are retained.")
&flags.pure, "pure", false, "if this flag is specified, devbox creates an isolated shell inheriting almost no variables from the current environment. A few variables, in particular HOME, USER and DISPLAY, are retained.")

flags.config.register(command)
flags.envFlag.register(command)
Expand Down
6 changes: 3 additions & 3 deletions internal/boxcli/shellenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ func shellEnvCmd(recomputeEnvIfNeeded *bool) *cobra.Command {
&flags.install, "install", false, "install packages before exporting shell environment")

command.Flags().BoolVar(
&flags.pure, "pure", false, "If this flag is specified, devbox creates an isolated environment inheriting almost no variables from the current environment. A few variables, in particular HOME, USER and DISPLAY, are retained.")
&flags.pure, "pure", false, "if this flag is specified, devbox creates an isolated environment inheriting almost no variables from the current environment. A few variables, in particular HOME, USER and DISPLAY, are retained.")
command.Flags().BoolVar(
&flags.preservePathStack, "preserve-path-stack", false,
"Preserves existing PATH order if this project's environment is already in PATH. "+
"preserves existing PATH order if this project's environment is already in PATH. "+
"Useful if you want to avoid overshadowing another devbox project that is already active")
_ = command.Flags().MarkHidden("preserve-path-stack")
command.Flags().BoolVar(
&flags.noRefreshAlias, "no-refresh-alias", false,
"By default, devbox will add refresh alias to the environment"+
"by default, devbox will add refresh alias to the environment"+
"Use this flag to disable this behavior.")
_ = command.Flags().MarkHidden("no-refresh-alias")

Expand Down
4 changes: 2 additions & 2 deletions internal/boxcli/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ func updateCmd() *cobra.Command {
&flags.sync,
"sync-lock",
false,
"Sync all devbox.lock dependencies in multiple projects. "+
"sync all devbox.lock dependencies in multiple projects. "+
"Dependencies will sync to the latest local version.",
)
command.Flags().BoolVar(
&flags.allProjects,
"all-projects",
false,
"Update all projects in the working directory, recursively.",
"update all projects in the working directory, recursively.",
)
return command
}
Expand Down