1. Georg Brandl
  2. pygments-main
  3. Issues
Issue #619 on hold

Bash heredoc for input, redirected output

Daniel Trebbien
created an issue

When a heredoc is used to feed data to a command, and the standard output of the command is redirected to a file, Pygments does not highlight the "redirect output to a file" part like normal.

For example: http://pygments.org/demo/11929/

{{{ cat <in.txt >out.txt cat <<'EOF' >nano/hooks/pre-revprop-change

! /usr/bin/env sh

exit 0 EOF }}}

Comments (2)

  1. Tim Hatch

    I originally punted on that part of the syntax, because it's very complex (arbitrary commands are allowed, see example that follows) and that the error doesn't exist beyond the heredoc itself (I tested on several giant scripts, to include a recent version of "configure"). Can you provide a patch?

    cat <<'EOF' | tr a-z \
    A-Z
    Hello World
    EOF
    
  2. Log in to comment