Skip to content

[scripts] add non-matching find-msg mode#1726

Draft
coyaSONG wants to merge 1 commit into
tstack:masterfrom
coyaSONG:fix/1666-find-msg-non-matching
Draft

[scripts] add non-matching find-msg mode#1726
coyaSONG wants to merge 1 commit into
tstack:masterfrom
coyaSONG:fix/1666-find-msg-non-matching

Conversation

@coyaSONG

Copy link
Copy Markdown
Contributor

Summary

  • add an optional match|not-match mode to find-msg
  • keep omitted mode backward-compatible with the existing matching behavior
  • use null-safe IS NOT semantics so a message without the focused field also counts as non-matching
  • add a regression that selects the first non-matching message

This lets users move to the next or previous message whose chosen field differs from the focused message, while existing invocations continue to work unchanged.

Closes #1666

Validation

  • red check on the untouched script: not-match was ignored and selected the next matching line (995)
  • modified script loaded by full path in the official lnav 0.14.0 arm64 macOS binary:
    • forward not-match selected line 662
    • reverse not-match selected line 660
    • omitted and explicit match both selected line 995
    • an invalid mode produced the expected validation error
  • the existing find-msg compatibility sequence remained 995, 661, 661, 994
  • bash -n test/test_sql_indexes.sh
  • git diff --check

A full native make check was not run locally because this checkout does not have lnav's complete native dependency/vcpkg toolchain; the focused script behavior was exercised through the official binary, and upstream CI remains the full build gate.

AI assistance

OpenAI Codex assisted with implementation and validation. No human review is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance find-msg.lnav script to search for non-matching message

1 participant