-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[draft] add token argument to ICompleteHandler #238
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #238 +/- ##
==========================================
- Coverage 74.78% 73.79% -0.99%
==========================================
Files 81 81
Lines 6218 6247 +29
Branches 1060 1049 -11
==========================================
- Hits 4650 4610 -40
- Misses 1555 1613 +58
- Partials 13 24 +11
Continue to review full report at Codecov.
|
d82001f
to
65c3b7d
Compare
@c4spar What do you think about this? I think the feature itself is pretty solid - it really unlocks the full potential of completion. But it should probably not break the API, so there needs to be another solution there. |
Sometimes you want to provide completion alternatives based on the commandline buffer. This adds `token` (string) to both option- and argument completion, containing the partially written word to complete.
2ff8739
to
280ceca
Compare
Hey @marcushultman, cool thx for this draft! If I understand it correctly, then This is definitely a feature I would like to add. I also thought about adding some more values, like an array with all tokens, cursor position, etc... but we should keep it consistent for all shells. I think I would either add an object as 3rd argument |
Sometimes you want to provide completion alternatives based on the
commandline buffer. This adds
token
(string) to both option- andargument completion, containing the partially written word to complete.
This draft implements it as a breaking change - there are alternatives:
completeWord
.parent
in existing handler.Initially I've only solved it for fish shell this far