code: func (a *App) Run(arguments []string) error {
  	// append help to commands
  	if a.Command(helpCommand.Name) == nil && !a.HideHelp {
  		a.Commands = append(a.Commands, helpCommand)
  		a.appendFlag(HelpFlag)
  	}
  
  	//append version/help flags
  	if a.EnableBashCompletion {
  		a.appendFlag(BashCompletionFlag)
  	}
  	a.appendFlag(VersionFlag)
  
  	// parse flags
  	set := flagSet(a.Name, a.Flags)
  	set.SetOutput(ioutil.Discard)
  	err := set.Parse(arguments[1:])
  	nerr := normalizeFlags(a.Flags, set)
  	if nerr != nil {
  		fmt.Println(nerr)
  		context := NewContext(a, set, set)
  		ShowAppHelp(context)
  		fmt.Println("")
  		return nerr
  	}
  	context := NewContext(a, set, set)
  
  	if err != nil {
  		fmt.Printf("Incorrect Usage.\n\n")
  		ShowAppHelp(context)
  		fmt.Println("")
  		return err
  	}
  
  	if checkCompletions(context) {
  		return nil
  	}
  
  	if checkHelp(context) {
  		return nil
  	}
  
  	if checkVersion(context) {
  		return nil
  	}
  
  	if a.Before != nil {
  		err := a.Before(context)
  		if err != nil {
  			return err
  		}
  	}
  
  	args := context.Args()
  	if args.Present() {
  		name := args.First()
  		c := a.Command(name)
  		if c != nil {
  			return c.Run(context)
  		}
  	}
  
  	// Run default Action
  	a.Action(context)
  	return nil
  }
docs: // Entry point to the cli app. Parses the arguments slice and routes to the proper flag/args combination