open
https://gitlab.synchro.net/main/sbbs/-/work_items/1345
## Idea
Add a **Find** command to the numbered-list selectors: the message group/sub-board and file library/directory selection lists (`J` in shells built on `shell_lib.js`), and the `uselect.js` "Select Item" module. Both are now built on the shared `exec/load/select_item.js` library, which already supports paging and arrow-key, Home/End and PgUp/PgDn navigation, so Find can be implemented there once.
The area lists benefit the most: on a system with many message groups and sub-boards, finding the sub-board named "Linux" currently means knowing (or guessing) which group it is in, then paging through that group's list.
## Proposed behavior
- **`/` or `F`**: prompt for search text (on the prompt line, defaulting to the previous search), then move the default item to the first match after the current item, scrolling or paging the list as needed.
- **`N`**: find the next match, wrapping around to the top of the list. Possibly accept **Ctrl-G** as an alias.
- The prompt (or a hint line) should mention the new keys.
### Boolean search terms
Case-insensitive, with a small self-contained matcher:
- `linux games`: both words (AND)
- `linux | bsd`: either word (OR)
- `!test` or `-test`: exclude a word (NOT)
- `"exact phrase"`: quoted phrase
The DD area choosers (`xtrn/DDAreaChoosers/`) already offer search via `/` with `N` for "next", so those keys would be familiar to users.
### What gets matched
Each caller decides via a new `select_item()` option, e.g. `opts.match(index, matcher)`:
- area lists: description, short name and internal code (e.g. `DOVE-SYSOPS`)
- `uselect`: the item name
## Open design questions
1. **Search scope in the area lists**: only the list currently displayed (the groups, or one group's sub-boards), or **all sub-boards in all groups** (and all directories in all libraries)? The latter is what users usually want: a match in another group would switch to that group's sub-board list with the match as the default item, and `N` would continue across groups. More work, but that is where Find pays off. `uselect` only needs the in-list search.
2. **Input function**: `console.getnum()` (even with its new `navkeys` argument) returns only digits, the quit key and navigation keys. Options:
- use the existing `console.getkeys(keys, max)`, which returns any key from a caller-supplied list (control characters included, so it covers the arrow keys too) or a number up to `max` with the same auto-submit behavior; numbers come back flagged with the high bit (`0x80000000`), so check how the JS binding reports them. No rebuild needed.
- or add a `hotkeys` argument to `console.getnum()` (another native change). 3. **Key conflicts to avoid**: **Ctrl-F** cannot be used, because Synchronet translates the Right arrow key to Ctrl-F (`TERM_KEY_RIGHT` is `CTRL_F` in `sbbsdefs.h`), so the two can't be told apart. **Ctrl-N** is PgDn (`TERM_KEY_PAGEDN`).
4. **Custom menu files**: when a sysop's `grps`/`subs<N>`/`libs`/`dirs<N>` menu file is displayed in place of the generated list, should Find still work (moving the default number shown in the prompt), or be disabled like the arrow keys are?
-- *Authored by Claude (Claude Code), on behalf of @rswindell*
--- SBBSecho 3.38-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)