Bug#885938: vim-runtime: sh syntax highlighting wrongly marks substring processing as bashism

Francesco Poli (wintermute) invernomuto at paranoici.org
Sun Dec 31 15:15:35 UTC 2017

Package: vim-runtime
Version: 2:8.0.0197-2
Severity: normal

Hello again,
as said in [another bug report], substring processing
(such as ${FOO%bar}, ${FOO%%bar}, ${FOO#bar}, ${FOO##bar})
is not a bashism: the man page for dash(1) states that it is supported
and checkbashism does not complain...

[another bug report]: <https://bugs.debian.org/848663#20>

Hence, I think vim should not mark it as an error.

Actually vim-runtime/2:7.4.488-7+deb8u2 (which is in jessie) correctly
highlights substring processing, as shown in the first attached
Unfortunately, vim-runtime/2:8.0.0197-2 (which is in stretch) wrongly
considers it as a syntax error in POSIX shell scripts, as shown in the
second attached screenshot.

The two screenshots were obtained (on jessie and stretch, respectively)

  $ view -u NONE test.sh

followed by

 :syn on 
 :set bg=dark

This bug is still unfixed in vim-runtime/2:8.0.1401-2 (currently in
buster and sid).

Please fix the bug and/or forward this report upstream, as appropriate.

Thanks for your time!

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

vim-runtime depends on no packages.

Versions of packages vim-runtime recommends:
ii  vim            2:8.0.1401-2
ii  vim-gtk [vim]  2:8.0.1401-2
ii  vim-tiny       2:8.0.1401-2

vim-runtime suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jessie_vim-syntaxPOSIXshell.png
Type: image/png
Size: 855 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20171231/f5047db4/attachment.png>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: stretch_vim-syntaxPOSIXshell.png
Type: image/png
Size: 891 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20171231/f5047db4/attachment-0001.png>

More information about the pkg-vim-maintainers mailing list