hamrpassArgHint is the args callback for /hamrpass: one synthetic row whose value mirrors the typed argument and whose description carries the live validation hint. Mirroring keeps the row alive: refreshSuggest filters via HasPrefix(value, prefix), and HasPrefix(x, x) is always true.
(m Model)
| 262 | // hamrpassArgHint is the args callback for /hamrpass: one synthetic row whose |
| 263 | // value mirrors the typed argument and whose description carries the live |
| 264 | // validation hint. Mirroring keeps the row alive: refreshSuggest filters via |
| 265 | // HasPrefix(value, prefix), and HasPrefix(x, x) is always true. |
| 266 | func hamrpassArgHint(m Model) []argOption { |
| 267 | _, rest, _ := strings.Cut(m.ta.Value(), " ") |
| 268 | rest = strings.TrimLeft(rest, " ") |
| 269 | _, hint, ok := hamrpassValidate(rest) |
| 270 | mark := "· " |
| 271 | switch { |
| 272 | case ok: |
| 273 | mark = "✓ " |
| 274 | case rest != "": |
| 275 | mark = "✗ " |
| 276 | } |
| 277 | return []argOption{{value: rest, description: mark + hint}} |
| 278 | } |
| 279 |
nothing calls this directly
no test coverage detected