Skip to content

fix: preserve completion cursor boundaries - #529

Open
codeforester wants to merge 1 commit into
mainfrom
bug/527-20260919-bug-preserve-nested-command-completion-at-cursor-end
Open

codeforester wants to merge 1 commit into
mainfrom
bug/527-20260919-bug-preserve-nested-command-completion-at-cursor-end

Conversation

@codeforester

@codeforester codeforester commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Make the generated completion adapter's cursor boundary invariant explicit: an end cursor gets an empty current word, while an in-range cursor preserves the existing word slice.
  • Add coverage for exact nested commands at the end cursor, out-of-range cursors, and unset completion variables under set -u.

Issue

Fixes #527

Validation

  • bats lib/bash/cli/tests/lib_cli.bats (40 tests passed).
  • ./tests/validate.sh (682 tests passed; artifact, release, concurrency, and quality contracts passed).
  • shellcheck --shell=bash --severity=warning lib/bash/cli/lib_cli.sh lib/bash/cli/tests/lib_cli.bats
  • bash -n lib/bash/cli/lib_cli.sh
  • git diff --check

API Impact

No command declaration, parser, handler, or option-resolution semantics changed. This preserves the documented nested-command completion behavior at the cursor boundary and makes the invariant regression-tested.

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.

bug: preserve nested command completion at cursor end

1 participant