Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Fixing autocomplete when using Zsh with bashcompinit wrapper #403

@otahontas

Description

@otahontas

Related to Issue #401 : when sourcing tmc-autocomplete and allowing 'bashcompinit' function in zshrc file, tmc autocompletion errors with "tmc _tmc_opts:10: unrecognized modifier `C'".

Apparently "${COMP_WORDS[@]:0:COMP_CWORD}" and
"${COMP_WORDS[@]:0:$COMP_CWORD}" aren't the same in zsh (according to: openshift/rhc#729).

Fixing line 17 in tmc-cli/scripts/autocompletion.sh does seem to fix the issue on zsh and preserves expected behaviour on bash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions