Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116035 - ebuild.vim plugin seems to not detect quoting properly
Summary: ebuild.vim plugin seems to not detect quoting properly
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Ciaran McCreesh
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-19 05:38 UTC by Peter Hyman
Modified: 2005-12-19 10:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hyman 2005-12-19 05:38:28 UTC
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 [[.
Comment 1 Ciaran McCreesh 2005-12-19 10:39:46 UTC
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.