Skip to content
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

_bcpp breaks dynamic completion loading when combined with python3-argcomplete #27

Open
tfendin opened this issue Sep 17, 2024 · 1 comment · May be fixed by #28
Open

_bcpp breaks dynamic completion loading when combined with python3-argcomplete #27

tfendin opened this issue Sep 17, 2024 · 1 comment · May be fixed by #28

Comments

@tfendin
Copy link

tfendin commented Sep 17, 2024

The _bcpp function doesn't detect the dynamic completion loading when its done with the function _python_argcomplete_global from the python3-argcomplete package.

This patch seems to fix it.

--- bash_completion-old	2020-03-23 13:42:34.064832178 +0100
+++ bash_completion	2024-09-17 21:08:22.819556320 +0200
@@ -306,7 +306,7 @@
     if [[ "$KEYS" == *o* ]]  # --cooperate|--override
     then
         local DYNAMIC
-        DYNAMIC=$(complete -p|grep -E -- '-D.*_completion_loader|_completion_loader.*-D')
+        DYNAMIC=$(complete -p|grep -E -- '-D.*_completion_loader|_completion_loader.*-D|_python_argcomplete_global.*-D')
 
         local _bcpp_filedir_original_code
         _bcpp_filedir_original_code=$(declare -f _filedir|tail -n+2)
@sio
Copy link
Owner

sio commented Sep 18, 2024

I'm not familiar with python3-argcomplete, but the suggestion seems sensible. Make a PR, I'll merge it. Thank you!

tfendin added a commit to tfendin/bash-complete-partial-path that referenced this issue Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants