Bash heredoc for input, redirected output

Issue #619 on hold
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:

{{{ 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 \
    Hello World
  2. Log in to comment