code: func (s *Action) generateCopyOrPrint(ctx context.Context, c *cli.Context, name, key, password string) error {
  	if ctxutil.IsAutoPrint(ctx) || c.Bool("print") {
  		if key != "" {
  			key = " " + key
  		}
  		out.Print(
  			ctx,
  			"The generated password for %s%s is:\n%s", name, key,
  			color.YellowString(password),
  		)
  	}
  
  	if ctxutil.IsAutoClip(ctx) || c.Bool("clip") {
  		if err := clipboard.CopyTo(ctx, name, []byte(password)); err != nil {
  			return ExitError(ctx, ExitIO, err, "failed to copy to clipboard: %s", err)
  		}
  	}
  
  	if c.Bool("print") || c.Bool("clip") {
  		return nil
  	}
  
  	entry := name
  	if key != "" {
  		entry += ":" + key
  	}
  	out.Print(ctx, "Password for %s generated", entry)
  	return nil
  }
docs: // generateCopyOrPrint will print the password to the screen or copy to the
  // clipboard