Skip to content

Multiple completions do not work with 'allexport' #1422

@nikitadanilov

Description

@nikitadanilov

Describe the bug

If an interactive shell has set -a, completion functions are exported and inherited by spawned non-interactive shells, which typically do not have extglob. This results in spurious errors like

/bin/bash: _patch: line 3: syntax error near unexpected token `('
/bin/bash: _patch: line 3: ` --strip | --ifdef | --prefix | --basename-prefix | --suffix | --get | -!(-*)[pDBYzg])'
/bin/bash: error importing function definition for `_patch'

(Similarly for _sudo, _tar, etc.)

To reproduce

Add set -a to you .bashrc.

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