Skip to content

Failure with bash completion v2 and bash v3 #1734

@marckhouzam

Description

@marckhouzam

With the merge of the ActiveHelp feature (#1482) I started seeing errors in the tests of https://github.com/marckhouzam/cobra-completion-testing for bash v3 when using descriptions.

Testing things manually:

bash-3.2# ./testprog __complete d
dasharg	Wants argument --arg
dir	Directive: subdir
:4
Completion ended with directive: ShellCompDirectiveNoFileComp
bash-3.2# ./testprog d
dasharg^IWants argument --arg dir^IDirective: subdir

We can see that the tab character that delimits a description gets somehow mistakenly converted to a ^I, which breaks the proper display of completion descriptions.

I will be posting a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions