Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ri): fix wrongly quoted options to compgen
The current implementation passes to `compgen` the option `-P ...` through the quoted word "$prefix" where prefix='-P ...'. However, this is interpreted by compgen as `-P' ...'` where an extra space is suffixed. It was originally specified in an unquoted form `$prefix` so that `-P` and `...` were split by the word splitting. This was broken in commit 9ba5831 [1], which added quotes based on shellcheck SC2086. In this patch, we use a different approach. We make the variable `prefix` only contains the prefix value `...` and explicitly specify the option `-P` at the calling site. [1] \ 9ba5831#diff-bbb83b7f6efc5ed7f97e90f27044b376b7a227f954b1ff6ff6ee0afea4bf4a36R32
- Loading branch information