Repository navigation
fix: complete literal bracketed file paths - #1811
Merged
kmvanbrunt merged 1 commit intoNov 14, 2026
Merged
Conversation
anticipate218
requested review from
kmvanbrunt and
tleonhardt
as code owners
November 14, 2026 08:40
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1811 +/- ##
=======================================
Coverage 99.75% 99.75%
=======================================
Files 23 23
Lines 6609 6609
=======================================
Hits 6593 6593
Misses 16 16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
kmvanbrunt
approved these changes
Nov 14, 2026
Contributor
Author
|
Thank you for reviewing and merging the fix. |
Member
|
@anticipate218 Thanks for the fix. I included it in another |
Contributor
Author
|
Thanks for extending this to get_exes_in_path() and adding the PATH-directory regression cases as well. |
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.
Fixes #1810.
File paths containing square brackets are currently interpreted as glob patterns during completion. For example, completing
[ab]can selecta.txtinstead of the existing[ab].txt; a bracketed working directory can make even blank completion return no results.This change escapes the fully expanded literal path before adding the completion wildcard. Tilde restoration, directory suffixes, path filters, and the existing rejection of typed
*/?remain unchanged. Eight regression cases cover literal filenames, absolute and relative paths, blank and prefixed completion from a bracketed working directory, home expansion, and directory filtering.Validation on Windows / Python 3.15.2:
uv run python -Xutf8 -m pytest tests: 2,788 passed, 174 skipped.uv lock --locked,uv run ty check,uv run mypy ., anduv run zensical build -spassed.prek run -acould not initialize the typos hook because its Git fetch stalled. A temporary configuration outside the repository ran the same hooks, substituting only the typos source install with the pinned PyPI packagetypos==1.52.2; the executable reportstypos-cli 1.52.2. No repository hook or CI configuration is changed.makeis unavailable in this environment, so its recipe commands were invoked directly throughuv. The Linux/macOS and other Python-version matrix was not run locally. The full test run left all 235 tracked source file hashes unchanged.AI assistance: the implementation, regression tests, and this description were prepared with OpenAI Codex.