Open xonixx opened 2 years ago
Thank you for the report. This is related to the following line in the code.
This must be
eval "makef=( -f ${words[i + 1]} )"
However, I don't think we should use eval
here to begin with. This executes command substitutions in the argument. If the command is incomplete, for example, this may break the user's data.
Describe the bug
Completion for
make
doesn't work for-f
when whitespace is present in file nameTo reproduce
Completion works:
Completion doesn't work:
Completion doesn't work:
Expected behavior
Completion yields targets from the referenced makefile with spaces in path
Versions (please complete the following information)
echo "$BASH_VERSION"
:(IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}")
:Additional context
I was working on the bash completion for utility similar to make that needs to auto-complete based on
-f/--file
provided and decided to check the implementation for make since it's doing similar thing.Debug trace