code: func RunCompletion(out io.Writer, boilerPlate string, cmd *cobra.Command, args []string) error {
  	if length := len(args); length == 0 {
  		return errors.New("shell not specified")
  	} else if length > 1 {
  		return errors.New("too many arguments. expected only the shell type")
  	}
  	run, found := completionShells[args[0]]
  	if !found {
  		return errors.Errorf("unsupported shell type %q", args[0])
  	}
  
  	if len(boilerPlate) == 0 {
  		boilerPlate = defaultBoilerPlate
  	}
  	if _, err := out.Write([]byte(boilerPlate)); err != nil {
  		return err
  	}
  	return run(out, cmd.Parent())
  }
docs: // RunCompletion checks given arguments and executes command