Bug#473736: vim-runtime: sh syntax problems with comments after `set', keywords, bash's `$""', nested cmd subst

Géraud Meyer geraud_meyer at hotmail.com
Tue Apr 1 10:03:07 UTC 2008


Package: vim-runtime
Version: 1:7.1.285-1
Severity: minor


1) comments after `set'
In vim-set the `#' after set is black as the rest of the line. In
vim-set2 `#' begins a comment.

$ cat vim-set
#!/bin/sh
set -x # not a comment

$ cat vim-set2
#!/bin/sh
set -x; # a comment


2) keywords
In vim-keyword the `for' in `-for-pack' is highlighted in light
blue-purple outside the braces and in brown (as a keyword) inside the
braces. The consequence is that the closing brace is red (for vim the
`for' statement is not finished).
In vim-keyword2 the `if' after `ls' (name of a file) is highlighted in
brown (as a keyword) even outside braces, whereas the `for' after `echo'
is not (in pink like a string) (echo arguments must be treated differently).

$ cat vim-keyword
#!/bin/sh
ocamlopt -for-pack truc
{
ocamlopt -for-pack truc
}

$ cat vim-keyword2
#!/bin/sh
echo for
ls if


3) bash's `$""'
$'' is recognized as a bashism ($ is brown) but not $"" ($ is pink).

$ cat vim-bashstring
#!/bin/bash
echo $"hello" $'world'


4) nested command substitution
The outer $() is red (indicating an error). This is not the case in
posix mode so it might not constitute a bug. I was just wondering if
nested command substitution should be enabled in the default sh mode.

$ cat vim-cmdsubst
#!/bin/sh
echo $(echo $(echo 1) 2) 3


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
Architecture: i386 (i686)

Kernel: Linux 2.6.24-desk1-k7 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

vim-runtime depends on no packages.

Versions of packages vim-runtime recommends:
ii  vim-gtk [vim]                1:7.1.285-1 Vi IMproved - enhanced vi
editor -

-- debconf-show failed






More information about the pkg-vim-maintainers mailing list