fix: complete path arguments before later options - #248
Conversation
7fc7894 to
5df353b
Compare
|
I traced this back to #116. The generated Bash function was keeping the path completer active, but it was still passing the already-typed option token ( Commit Validation on this checkout:
The full pytest suite still cannot start on this Windows checkout because its POSIX |
for more information, see https://pre-commit.ci
casperdcl
left a comment
There was a problem hiding this comment.
this currently breaks examples/pathcomplete.py:
pathcomplete -<TAB> # doesn't list --options
pathcomplete . -<TAB> # correctly lists --options
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #248 +/- ##
==========================================
+ Coverage 84.71% 85.20% +0.48%
==========================================
Files 3 3
Lines 471 473 +2
Branches 93 93
==========================================
+ Hits 399 403 +4
- Misses 38 39 +1
+ Partials 34 31 -3 🚀 New features to boost your workflow:
|
What changed
When Bash is completing a custom path argument and the next token already starts with
-, the generated completer now keeps the path completer active. This covers editing a command such as... -d -wand prevents the later option from being inserted as the path value.Verification
python -m compileall -q shtabgit diff --checkI could not run the full pytest suite on this Windows checkout because the repository's POSIX
ptytest helper requirestermios, and the local environment also has incompatible pytest recording plugins. Let me know what you think.