Skip to content

feat: sort bindings by key text within each group - #21

Merged
cboone merged 2 commits into
mainfrom
feature/sort-bindings
Feb 9, 2026
Merged

feat: sort bindings by key text within each group#21
cboone merged 2 commits into
mainfrom
feature/sort-bindings

Conversation

@cboone

@cboone cboone commented Feb 9, 2026

Copy link
Copy Markdown
Owner

Sort bindings alphabetically by binding text (case-sensitive) using
insertion sort in the AWK parser. Set LC_ALL=C for consistent
byte-order comparison regardless of the user's locale.

Sort bindings alphabetically by binding text (case-sensitive) using
insertion sort in the AWK parser. Set LC_ALL=C for consistent
byte-order comparison regardless of the user's locale.
Copilot AI review requested due to automatic review settings February 9, 2026 02:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the binding list output deterministic and easier to scan by sorting bindings alphabetically (byte-order, case-sensitive) within each group, and by ensuring the sort order is stable across user locales.

Changes:

  • Added an insertion sort routine in scripts/parse-bindings.awk and applied it per table before emitting BIND lines.
  • Ran the AWK parser under LC_ALL=C in the popup entrypoint to ensure locale-independent ordering.
  • Updated scrut tests to set LC_ALL=C and to match the new sorted output order.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/parse-bindings.scrut Updates expected output order per group and forces LC_ALL=C for deterministic test results.
scripts/popup.sh Ensures runtime parsing uses LC_ALL=C so sorting is consistent across locales.
scripts/parse-bindings.awk Introduces per-table insertion sort and applies it before printing each group.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/parse-bindings.awk

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@cboone
cboone merged commit 53ce3bc into main Feb 9, 2026
7 checks passed
@cboone
cboone deleted the feature/sort-bindings branch February 9, 2026 02:38
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.

2 participants