code: func (s *Action) CompleteGenerate(ctx context.Context, c *cli.Context) {
  	args := c.Args()
  	if len(args) < 1 {
  		return
  	}
  	needle := args[0]
  
  	_, err := s.Store.Initialized(ctx) // important to make sure the structs are not nil
  	if err != nil {
  		out.Error(ctx, "Store not initialized: %s", err)
  		return
  	}
  	list, err := s.Store.List(ctx, 0)
  	if err != nil {
  		return
  	}
  
  	if strings.Contains(needle, "/") {
  		list = filterPrefix(uniq(extractEmails(list)), path.Base(needle))
  	} else {
  		list = filterPrefix(uniq(extractDomains(list)), needle)
  	}
  
  	for _, v := range list {
  		fmt.Fprintln(stdout, bashEscape(v))
  	}
  }
docs: // CompleteGenerate implements the completion heuristic for the generate command