Skip to content

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

Closed
@tfendin

Description

@tfendin

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions