i tried that:

    cat .bashrc  | highlight --force -O xterm256 | less -SRNI
everything is green, except line numbers are black (which comes from less), but

    bat .bashrc
shows actual syntax highlighting.

so apparently, no, it doesn't work.

to be fair, this is how it works:

   cat .bashrc | highlight --syntax shellscript -O ansi | less -R
to avoid getting caught by the useless use of cat police, this does too:

   highlight --syntax shellscript -O ansi .bashrc | less -R
however, i have to tell it which syntax to use

but to its credit, highlight even has support for pike, which bat doesn't (yet) (fixed that for myself, at least)

so overall, bat wins.

oh, i feel stupid now, the reason bat worked and highlight didn't was because bat had access to the filename extension. if highlight is called with a filename argument it can detect the syntax too.

so really bat and hightlight are equal, and it's not just a useless use of cat, but using cat here actually breaks the syntax detection. and it does so in bat too, obviously.

so this means highlight almost wins because it has pike support already, whereas for bat i had to add it, except that it turns out that if highlight can't detect the syntax it produces nothing, and you need --force to fix that, and if it is given multiple files as arguments it writes the output to files too, which is practically never what i want so i need to fix that with --stdout.

bat it is.