Closed PowerKiKi closed 7 years ago
A. What version of the library are you using:
master
branch?
B. Does it help if you add -m
option to the hook generation command?
Using 0.7.0. Adding -m
does solve my issue, thanks a lot !
Now that I know about it, I should have mentioned that my app is in the PATH
and so I use from anywhere without prefixing it with absolute path. Reverting the hook without -m
and using absolute path to call the app does actually work too.
Is there any reason why I would not use the -m
option ?
Using 0.7.0. Adding -m does solve my issue, thanks a lot !
This is known issue, that auto-complete only works, when you invoke app (to be autocompleted) using absolute path. When app is in PATH, then you only type binary name (e.g. eco
) and not absolute path (e.g. /path/to/eco
) and that's why auto-complete isn't triggered.
The #68 PR is created, that should fix it, but it's not yet merged.
I realize this may be slightly outside of the scope of this project, but I can't get my shell to trigger completion with this lib. And I would really appreciate it if you could point me in the right direction to debug the situation.
So I added this project as dep to mine and registered the command in my app. I can manually test completion with success:
Then I added
eval $(eco _completion --generate-hook)
to my~/.bashrc
. When I open a new shell, I can also manually test that the function does exists and can be called (even though it does not return anything):But when I try to actually complete my commands, I get nothing (or the standard file completion) instead of my commands:
As far as I can tell the generated hook seems to be correct (absolute path to my app are OK). Would you have any idea where this might come from ?
(Ubuntu 16.04.1 LTS)