code: func (c Command) Run(ctx *Context) error {
  
  	if len(c.Subcommands) > 0 || c.Before != nil {
  		return c.startApp(ctx)
  	}
  
  	if !c.HideHelp {
  		// append help to flags
  		c.Flags = append(
  			c.Flags,
  			HelpFlag,
  		)
  	}
  
  	if ctx.App.EnableBashCompletion {
  		c.Flags = append(c.Flags, BashCompletionFlag)
  	}
  
  	set := flagSet(c.Name, c.Flags)
  	set.SetOutput(ioutil.Discard)
  
  	firstFlagIndex := -1
  	for index, arg := range ctx.Args() {
  		if strings.HasPrefix(arg, "-") {
  			firstFlagIndex = index
  			break
  		}
  	}
  
  	var err error
  	if firstFlagIndex > -1 && !c.SkipFlagParsing {
  		args := ctx.Args()
  		regularArgs := args[1:firstFlagIndex]
  		flagArgs := args[firstFlagIndex:]
  		err = set.Parse(append(flagArgs, regularArgs...))
  	} else {
  		err = set.Parse(ctx.Args().Tail())
  	}
  
  	if err != nil {
  		fmt.Printf("Incorrect Usage.\n\n")
  		ShowCommandHelp(ctx, c.Name)
  		fmt.Println("")
  		return err
  	}
  
  	nerr := normalizeFlags(c.Flags, set)
  	if nerr != nil {
  		fmt.Println(nerr)
  		fmt.Println("")
  		ShowCommandHelp(ctx, c.Name)
  		fmt.Println("")
  		return nerr
  	}
  	context := NewContext(ctx.App, set, ctx.globalSet)
  
  	if checkCommandCompletions(context, c.Name) {
  		return nil
  	}
  
  	if checkCommandHelp(context, c.Name) {
  		return nil
  	}
  	context.Command = c
  	c.Action(context)
  	return nil
  }
docs: // Invokes the command given the context, parses ctx.Args() to generate command-specific flags