Commit Graph

1 Commits

Author SHA1 Message Date
8661948cf6 v0.7.0: HL7-aware tab completion + REPL mouse mode
Two REPL enhancements:

1. HL7 v2.x inline tab completion. Type a segment ID or SEG.field or
   SEG.field.component in any prompt and TAB completes against a built-in
   schema (18 segments fully fielded: MSH, PID, PV1, PV2, EVN, MSA, ERR,
   NK1, GT1, IN1, IN2, OBR, OBX, ORC, AL1, DG1, PR1, ROL; component
   breakdowns for MSH.9, PID.3, PID.5, PID.11, PV1.3, NK1.4, OBX.3, IN1.4).
   New slash commands /hl7 <SEG> and /hl7-fields <SEG.N> print schema
   without typing. Z-segments get a "site-specific" hint instead of a
   guess. Exact-match wins over prefix siblings (PID.3 completes over
   PID.30; MSH completes over MSH+MSA).

2. Mouse mode. /mouse on|off and LARRY_NO_MOUSE env kill switch enable
   bracketed-paste + SGR mouse reporting (mode 1006). Click-to-position
   cursor in the input line is intentionally NOT implemented in this
   pass — it requires per-terminal escape parsing inside bind -x which
   is not reliable across iTerm2 / macOS Terminal / MobaXterm / Cygwin
   in a single pass. Documented as terminal-dependent.

New file: lib/hl7-schema.sh (sourced; bash assoc arrays for the segment
+field+component tables, plus helpers hl7_segments / hl7_fields_for /
hl7_components_for / hl7_field_name).

MANIFEST + install-larry.sh updated to fetch the new lib file on
install/self-update.

Regression-safe: v0.6.9 status line, slash completion, @file completion,
streaming SSE, header capture, and all 37 prior slash commands are
unchanged. Added 3 new slash commands (/hl7, /hl7-fields, /mouse).

Verification: 15/15 automated checks on the three completion paths
(segment, field, component) — including mid-buffer completion and
exact-match preference.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 16:15:11 -07:00