Loading ...
Sorry, an error occurred while loading the content.

bash syntax highlighting issue with heredocs

Expand Messages
  • Nirk Niggler
    Looking at vim 7.3 filetype.vim: Vim support file to detect file types Maintainer: Bram Moolenaar Last Change: 2010 Jul 30 This is valid
    Message 1 of 4 , Mar 20, 2013
    • 0 Attachment
      Looking at vim 7.3 filetype.vim:

      " Vim support file to detect file types
      "
      " Maintainer: Bram Moolenaar <****@***.***>
      " Last Change: 2010 Jul 30


      This is valid bash:

      #!/bin/bash
      head -n 3 <<FOOBAR | cat
      1
      2
      3
      4
      5
      FOOBAR

      The output is:

      1
      2
      3


      The script (with the shebang line) is available at http://hastebin.com/rusoculipo.bash

      The syntax highlighting treats the "| cat" part of the command to be a string (as if the heredoc starts from the <<), but it should be considered part of the pipeline.

      --
      --
      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Christian Brabandt
      Hi Nirk! ... This should go to the maintainer of the syntax script, that is mentioned at the top of the syntax/sh.vim file (in your runtime directory).
      Message 2 of 4 , Mar 21, 2013
      • 0 Attachment
        Hi Nirk!

        On Mi, 20 Mär 2013, Nirk Niggler wrote:

        > Looking at vim 7.3 filetype.vim:
        >
        > " Vim support file to detect file types
        > "
        > " Maintainer: Bram Moolenaar <****@***.***>
        > " Last Change: 2010 Jul 30
        >
        >
        > This is valid bash:
        >
        > #!/bin/bash
        > head -n 3 <<FOOBAR | cat
        > 1
        > 2
        > 3
        > 4
        > 5
        > FOOBAR
        >
        > The output is:
        >
        > 1
        > 2
        > 3
        >
        >
        > The script (with the shebang line) is available at http://hastebin.com/rusoculipo.bash
        >
        > The syntax highlighting treats the "| cat" part of the command to be a string (as if the heredoc starts from the <<), but it should be considered part of the pipeline.

        This should go to the maintainer of the syntax script, that is mentioned
        at the top of the syntax/sh.vim file (in your runtime directory).

        regards,
        Christian
        --
        Ob Hamster, Biber oder Maus, McDonald's macht 'nen BigMac draus.

        --
        --
        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 vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Nirk Niggler
        Christian: Thanks for a quick response. I provided the file header, and the maintainer is Bram. Under any other circumstance, I would direct my message to the
        Message 3 of 4 , Mar 21, 2013
        • 0 Attachment
          Christian:

          Thanks for a quick response. I provided the file header, and the
          maintainer is Bram.

          Under any other circumstance, I would direct my message to the
          appropriate person. But we are talking about Bram, and I imagine by
          now he would have outsourced maintenance of vim files to other people.

          - Nirk

          On Thu, Mar 21, 2013 at 3:01 AM, Christian Brabandt <cblists@...> wrote:
          > Hi Nirk!
          >
          > On Mi, 20 Mär 2013, Nirk Niggler wrote:
          >
          >> Looking at vim 7.3 filetype.vim:
          >>
          >> " Vim support file to detect file types
          >> "
          >> " Maintainer: Bram Moolenaar <****@***.***>
          >> " Last Change: 2010 Jul 30
          >>
          >>
          >> This is valid bash:
          >>
          >> #!/bin/bash
          >> head -n 3 <<FOOBAR | cat
          >> 1
          >> 2
          >> 3
          >> 4
          >> 5
          >> FOOBAR
          >>
          >> The output is:
          >>
          >> 1
          >> 2
          >> 3
          >>
          >>
          >> The script (with the shebang line) is available at http://hastebin.com/rusoculipo.bash
          >>
          >> The syntax highlighting treats the "| cat" part of the command to be a string (as if the heredoc starts from the <<), but it should be considered part of the pipeline.
          >
          > This should go to the maintainer of the syntax script, that is mentioned
          > at the top of the syntax/sh.vim file (in your runtime directory).
          >
          > regards,
          > Christian
          > --
          > Ob Hamster, Biber oder Maus, McDonald's macht 'nen BigMac draus.
          >
          > --
          > --
          > 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 a topic in the Google Groups "vim_dev" group.
          > To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/C8zhEctybeg/unsubscribe?hl=en.
          > To unsubscribe from this group and all its topics, send an email to vim_dev+unsubscribe@....
          > For more options, visit https://groups.google.com/groups/opt_out.
          >
          >

          --
          --
          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 vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • James McCoy
          ... Bram maintains filetype.vim, but not syntax/sh.vim which is where the syntax highlighting for bash is defined. That s maintained by Charles Campbell. -- --
          Message 4 of 4 , Mar 21, 2013
          • 0 Attachment


            On Mar 21, 2013 9:43 AM, "Nirk Niggler" <nirk.niggler@...> wrote:
            >
            > Christian:
            >
            > Thanks for a quick response.  I provided the file header, and the
            > maintainer is Bram.

            Bram maintains filetype.vim, but not syntax/sh.vim which is where the syntax highlighting for bash is defined. That's maintained by Charles Campbell.

            --
            --
            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 vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
             
             
          Your message has been successfully submitted and would be delivered to recipients shortly.