Skip to content

Tilde in program path interpreted literally when using --multiple #70

Open
@stecman

Description

@stecman

The multiple option uses $1 instead of a fixed path for the completion program. When trying to complete for a program in the home directory using a path starting with ~/, the program path is interpreted as containing a literal tilde character, instead of expanding to $HOME.

This:

RESULT="$($1 _completion)";

resolves to effectively:

RESULT="$('~/bin/beam' _completion)";

which results in an error:

$ ~/bin/beam [tab]
-bash: ~/bin/beam: No such file or directory

instead of the expected behaviour:

RESULT="$("$HOME/bin/beam" _completion)";

Once this is resolved, multiple could be on by default too I think.

Tested using Bash 4.3 and 3.2.on OSX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions