Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stecman opened this issue Sep 18, 2016 · 1 comment
Open
Labels

Comments

@stecman
Copy link
Owner

stecman commented Sep 18, 2016

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.

@stecman stecman added the bug label Sep 18, 2016
@aik099
Copy link
Contributor

aik099 commented Sep 19, 2016

Replacing ~ with ${HOME} in app path used in RESULT variable in hook code sounds like a plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants