fix: use jq for completion name extraction to avoid nested matches #30

Merged
michal merged 1 commits from fix/completion-nested-names into main 2026-02-23 19:23:49 +00:00
Owner

Summary

  • Fix completions mixing resource names from different types (e.g. server names showing up when completing project names)
  • Root cause: regex on JSON matched nested objects (servers inside projects)
  • Switch to jq -r '.[].name' for proper top-level name extraction in both fish and bash completions
  • Add jq as RPM dependency
  • Add pr.sh for PR creation via Gitea API
  • Add 2 new tests ensuring completions use jq instead of regex for name extraction

Test plan

  • 283 CLI tests pass (14 completion tests, 2 new for jq usage)
## Summary - Fix completions mixing resource names from different types (e.g. server names showing up when completing project names) - Root cause: regex on JSON matched nested objects (servers inside projects) - Switch to `jq -r '.[].name'` for proper top-level name extraction in both fish and bash completions - Add `jq` as RPM dependency - Add `pr.sh` for PR creation via Gitea API - Add 2 new tests ensuring completions use jq instead of regex for name extraction ## Test plan - [x] 283 CLI tests pass (14 completion tests, 2 new for jq usage)
michal added 1 commit 2026-02-23 19:23:43 +00:00
fix: use jq for completion name extraction to avoid nested matches
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / package (pull_request) Has been cancelled
e2c54bfc5c
The regex "name":\s*"..." on JSON matched nested server names inside
project objects, mixing resource types in completions. Switch to
jq -r '.[].name' for proper top-level extraction. Add jq as RPM
dependency. Add pr.sh for PR creation via Gitea API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal merged commit b81d3be2d5 into main 2026-02-23 19:23:49 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: michal/mcpctl#30