IRC: no tab completion of nicks #90

Closed
opened 2026-09-02 23:25:36 -04:00 by Salastil · 1 comment
Owner

The composer has no completion at all - grep -rn "'Tab'" src/renderer/src returns nothing. Typing a nick means typing it exactly, in a client whose whole point is talking to people whose names are [Fish]tank_, dr4gon^, nick|away.

Every IRC client completes on Tab, cycles on repeated presses, and appends : at the start of a line. Discord and Matrix want the same thing for their own mention syntax, so this is one mechanism with three back ends.

Done looks like: Tab completes the nick prefix before the cursor from the current channel's roster, most-recently-spoken first; repeated Tab cycles; a completion at position zero gets the : suffix.

The composer has no completion at all - `grep -rn "'Tab'" src/renderer/src` returns nothing. Typing a nick means typing it exactly, in a client whose whole point is talking to people whose names are `[Fish]tank_`, `dr4gon^`, `nick|away`. Every IRC client completes on Tab, cycles on repeated presses, and appends `: ` at the start of a line. Discord and Matrix want the same thing for their own mention syntax, so this is one mechanism with three back ends. **Done looks like:** Tab completes the nick prefix before the cursor from the current channel's roster, most-recently-spoken first; repeated Tab cycles; a completion at position zero gets the `: ` suffix.
Author
Owner

Finished. Tab completes the name before the caret from the channel's roster, cycles through the matches on repeated presses, and follows a name at the start of a line with : . Matching is case-insensitive but the completion keeps the roster's own capitalisation, since a nick's case is part of it and getting it wrong is how a highlight fails to fire.

The rule lives apart from the composer in lib/completion.ts — what counts as the word being completed, and what follows a completed name, is the interesting part; the contenteditable is not.

nobilis f4c097c, moho https://git.salastil.com/Salastil/moho/commit/0d57bd0

Finished. Tab completes the name before the caret from the channel's roster, cycles through the matches on repeated presses, and follows a name at the start of a line with `: `. Matching is case-insensitive but the completion keeps the roster's own capitalisation, since a nick's case is part of it and getting it wrong is how a highlight fails to fire. The rule lives apart from the composer in `lib/completion.ts` — what counts as the word being completed, and what follows a completed name, is the interesting part; the contenteditable is not. nobilis f4c097c, moho https://git.salastil.com/Salastil/moho/commit/0d57bd0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#90