In the nvidia-glx-1.0.8174 and earlier ebuilds, the following statement is parsed incorrectly in vim/gvim. if [[ "${MLTEST/set_abi}" == "${MLTEST}" ]] && has_multilib_profile ; then ...... everything after "${MLTEST}", including ]] is considered inside a quote and is colored as such. For some reason, the [[ ]] construct is missed. Changing [[ ]] to [ ] yields the same result. The following examples MAY NOT BE PROPER syntax but are shown to highlight the issue: Removing the quotes from the FIRST parameter before == causes the quoting to properly recognize [[ ]]. if [[ ${MLTEST/set_abi} == "${MLTEST}" ]] # works Removing quotes from second parameter, after == does NOT work if [[ "${MLTEST/set_abi}" == ${MLTEST} ]] # does not work having a single quote before the first parameter seems to show proper coloring: if [[ "${MLTEST/set_abi} == ${MLTEST} ]] # works also works if second parameter is fully quoted. When coloring works, the ]] is a different color than [[.
Yeah, that's a bug we inherit from the Vim-supplied sh syntax script. Specifically, it's screwy about bash ${foo/bar} unless it's written ${foo/bar/}. Upstream have been informed.