Skip to content

Fish completion fails with quotes in argument #1214

@Luap99

Description

@Luap99

The fish completion script prints ugly traces if quotes are not balanced in the argument.

To reproduce: ./testprog '[TAB]

> ./testprog '- (line 1): Unexpected end of string, quotes are not balanced
./testprog __complete ' 
                      ^
in command substitution
        called on line 35 of file -
in function '__testprog_perform_completion' with arguments './testprog\ \''
        called on line 1 of file -
in command substitution
        called on line 71 of file -
in function '__testprog_prepare_completions'
in command substitution

This happens with single and double quotes. Technically the completion still works and offers file completion but the traces makes this unusable.

I also checked this with zsh, bash, #1146 and #1208 but only fish is affected. All other shells offer file completion, which is in my eyes the right thing.

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