code: func (s *Action) findSelection(ctx context.Context, c *cli.Context, choices []string, needle string, cb showFunc) error {
  	sort.Strings(choices)
  	act, sel := cui.GetSelection(ctx, "Found secrets - Please select an entry", "<↑/↓> to change the selection, <→> to show, <←> to copy, <s> to sync, <e> to edit, <ESC> to quit", choices)
  	out.Debug(ctx, "Action: %s - Selection: %d", act, sel)
  	switch act {
  	case "default":
  		// display or copy selected entry
  		fmt.Fprintln(stdout, choices[sel])
  		return cb(ctx, c, choices[sel], "", false)
  	case "copy":
  		// display selected entry
  		fmt.Fprintln(stdout, choices[sel])
  		return cb(WithClip(ctx, true), c, choices[sel], "", false)
  	case "show":
  		// display selected entry
  		fmt.Fprintln(stdout, choices[sel])
  		return cb(WithClip(ctx, false), c, choices[sel], "", false)
  	case "sync":
  		// run sync and re-run show/find workflow
  		if err := s.Sync(ctx, c); err != nil {
  			return err
  		}
  		return cb(ctx, c, needle, "", true)
  	case "edit":
  		// edit selected entry
  		fmt.Fprintln(stdout, choices[sel])
  		return s.edit(ctx, c, choices[sel])
  	default:
  		return ExitError(ctx, ExitAborted, nil, "user aborted")
  	}
  }
docs: // findSelection runs a wizard that lets the user select an entry