Hi,

There are a lot of issues with the sh syntax for heredoc, these patches
attempt to solve them. I counted at least eight bugs fixed.

It has been *six* years since I originally sent the patches and many of the
issues still remain.

You can open this file and see for yourself.

        double='DDOUBLE'

        # 01
        cat <<EOF
        this is $double
        EOF
        cat << EOF
        this is $double
        EOF

        # 02
        cat <<-EOF
                this is $double
                EOF
        cat <<- EOF
                this is $double
                EOF

        # 03
        cat <<\EOF
        this is $single
        EOF
        # BUG 2
        cat << \EOF
        this is $single
        EOF

        # 04
        # BUG 1
        cat <<-\EOF
                this is $single
                EOF
        cat <<- \EOF
                this is $single
                EOF

        # 05
        cat <<'EOF'
        this is $single
        EOF
        cat << 'EOF'
        this is $single
        EOF

        # 06
        cat <<-'EOF'
                this is $single
                EOF
        cat <<- 'EOF'
                this is $single
                EOF

        # 07
        cat <<"EOF"
        this is $single
        EOF
        cat << "EOF"
        this is $single
        EOF

        # 08
        cat <<-"EOF"
                this is $single
                EOF
        cat <<- "EOF"
                this is $single
                EOF

        # 09
        cat <<\
        EOF
        this is $double
        EOF
        cat <<\
         EOF
        this is $double
        EOF

        # 10
        # BUG 3
        cat <<-\
                EOF
                this is $double
                EOF
        cat <<- \
                EOF
                this is $double
                EOF

        # BUG 4
        # 11
        cat <<\
        \EOF
        this is $single
        EOF
        cat << \
        \EOF
        this is $single
        EOF

        # 12
        cat <<-\
                \EOF
                this is $single
                EOF
        cat <<- \
                 \EOF
                this is $single
                EOF

        # 13
        cat <<\
        'EOF'
        this is $single
        EOF
        # BUG 5
        cat <<\
        'E O F'
        this is $single
        E O F
        cat << \
         'E O F'
        this is $single
        E O F

        # 14
        cat <<-\
                'EOF'
                this is $single
                EOF
        cat <<-\
                'E O F'
                this is $single
                E O F
        cat <<- \
                 'E O F'
                this is $single
                E O F

        # 15
        cat <<\
        "EOF"
        this is $single
        EOF
        cat <<\
        "E O F"
        this is $single
        E O F
        cat << \
        "E O F"
        this is $single
        E O F

        # 16
        cat <<-\
                "EOF"
                this is $single
                EOF
        cat <<-\
                "E O F"
                this is $single
                E O F
        cat <<- \
                 "E O F"
                this is $single
                E O F


Felipe Contreras (9):
  syntax: sh: fix doublequote regression in heredoc
  syntax: sh: fix quote style in heredoc
  syntax: sh: fix unmatched syntax
  syntax: sh: remove duplicate syntax
  syntax: sh: fix heredoc match
  syntax: sh: remove extra heredoc match
  syntax: sh: add missing match
  syntax: sh: reorganize heredocs
  syntax: sh: cleanup matches

 runtime/syntax/sh.vim | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

-- 
2.28.0

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20201019121608.70389-1-felipe.contreras%40gmail.com.

Raspunde prin e-mail lui