fix(list): wrap long regex cells instead of truncating#14
Merged
nnemirovsky merged 3 commits intomainfrom Apr 15, 2026
Merged
Conversation
The /passthru:list table used to truncate the match-summary column at 40 (flat) or 50 (grouped) characters with a "..." ellipsis, hiding the trailing part of long regexes. Users shown only half of a regex cannot validate what rule they're about to keep or remove. This commit removes the truncate_str helper, detects terminal width (COLUMNS, tput cols, 120 fallback), allocates column budgets dynamically (tool min 12 / max 20 chars, match 60% of remainder, reason 40%), and wraps overflow across continuation lines. Continuation lines pad the leading columns (scope/list/source/#/tool) with spaces so wrapped text remains aligned under its column header. Breaks prefer space / pipe / comma within the last quarter of the column width, with a hard break fallback. JSON and raw output formats are unchanged.
SC1087 complained about `${#$arr_name[@]}` inside eval because it saw
the bare variable without braces as an array index. Wrap the name in
braces so the resolved form is unambiguous.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan