Skip to content

Commit

Permalink
Improve ddev start/stop/remove help text (#1000)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfrench committed Jul 19, 2018
1 parent 3aae0cc commit ebcebdb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
12 changes: 7 additions & 5 deletions cmd/ddev/cmd/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ var removeAll bool

// DdevRemoveCmd represents the remove command
var DdevRemoveCmd = &cobra.Command{
Use: "remove [projectname]",
Use: "remove [projectname ...]",
Aliases: []string{"rm"},
Short: "Remove the development environment for a project.",
Long: `Remove the development environment for a project. You can run 'ddev remove'
from a project directory to remove that project, or you can specify a project to remove
by running 'ddev remove <projectname>'. By default, remove is a non-destructive operation and will
leave database contents intact. Remove never touches your code or files directories.
from a project directory to remove that project, or you can remove projects in
any directory by running 'ddev remove projectname [projectname ...]'.
By default, remove is a non-destructive operation and will leave database
contents intact. Remove never touches your code or files directories.
To remove database contents, you may use the --remove-data flag with remove.`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down Expand Up @@ -48,6 +50,6 @@ To remove database contents, you may use the --remove-data flag with remove.`,

func init() {
DdevRemoveCmd.Flags().BoolVarP(&removeData, "remove-data", "R", false, "Remove stored project data (MySQL, logs, etc.)")
DdevRemoveCmd.Flags().BoolVarP(&removeAll, "all", "a", false, "Remove all running and stopped sites")
DdevRemoveCmd.Flags().BoolVarP(&removeAll, "all", "a", false, "Remove all running and stopped projects")
RootCmd.AddCommand(DdevRemoveCmd)
}
10 changes: 6 additions & 4 deletions cmd/ddev/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ var startAll bool

// StartCmd represents the add command
var StartCmd = &cobra.Command{
Use: "start",
Use: "start [projectname ...]",
Aliases: []string{"add"},
Short: "Start a ddev project.",
Long: `Start initializes and configures the web server and database containers to
provide a local development environment.`,
Long: `Start initializes and configures the web server and database containers
to provide a local development environment. You can run 'ddev start' from a
project directory to start that project, or you can start stopped projects in
any directory by running 'ddev start projectname [projectname ...]'`,
PreRun: func(cmd *cobra.Command, args []string) {
dockerutil.EnsureDdevNetwork()
},
Expand Down Expand Up @@ -46,6 +48,6 @@ provide a local development environment.`,
}

func init() {
StartCmd.Flags().BoolVarP(&startAll, "all", "a", false, "Start all stopped sites")
StartCmd.Flags().BoolVarP(&startAll, "all", "a", false, "Start all stopped projects")
RootCmd.AddCommand(StartCmd)
}
8 changes: 4 additions & 4 deletions cmd/ddev/cmd/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ var stopAll bool

// DdevStopCmd represents the stop command
var DdevStopCmd = &cobra.Command{
Use: "stop [projectname]",
Use: "stop [projectname ...]",
Short: "Stop the development environment for a project.",
Long: `Stop the development environment for a project. You can run 'ddev stop'
from a project directory to stop that project, or you can specify a running project
to stop by running 'ddev stop <projectname>.`,
from a project directory to stop that project, or you can stop running projects
in any directory by running 'ddev stop projectname [projectname ...]'`,
Run: func(cmd *cobra.Command, args []string) {
apps, err := getRequestedApps(args, stopAll)
if err != nil {
Expand All @@ -31,6 +31,6 @@ to stop by running 'ddev stop <projectname>.`,
}

func init() {
DdevStopCmd.Flags().BoolVarP(&stopAll, "all", "a", false, "Stop all running sites")
DdevStopCmd.Flags().BoolVarP(&stopAll, "all", "a", false, "Stop all running projects")
RootCmd.AddCommand(DdevStopCmd)
}

0 comments on commit ebcebdb

Please sign in to comment.