-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support compopt in completion functions #78
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Thanks for this PR @NiklasReisser! Just merged #81, is this still required? |
Hi @casperdcl , I am on holiday without my laptop from work, so I can't test it. Here is what I want to do: For example Now I want to complete that peacemeal just like a filesystem path. I'd also be fine with completing the whole path at once, like any other comletion, but in this case the issue is that shtab enables -o filenames globally for all completions. This causes readline to only print the last bit of the path for the completion. Best regards, Niklas |
@casperdcl Can confirm now, I'd still need this for my usecase. Cheers |
@casperdcl This issue seems to also prevent usage of bash completion builtins like _available_interfaces, which modify COMPREPLY directly. |
There's some conflicts now though with the main branch. Also, would making this line configurable be a simpler alternative? Line 433 in 60a8525
|
38e334b
to
6a7ba97
Compare
Hi, I've resolved the merge conflict. Unfortunately, I think making the main "complete" configurable would only allow a global setting for all completions for a given program. My approach is more generic. I admit I don't particularily like it due to the tmpfile. But it is the only approach I can think of without changing the API. |
@0x2b3bfa0 - PTAL - worth resolving conflicts and merging this? |
@omesser, this pull request uses |
Fixes #77