Closed jihchi closed 2 years ago
This is arguably the domain of a dedicated syntax highlighter (e.g., bat
):
$ curl -sL google.com | htmlq -p html body div | bat -lhtml
I mean, it looks nice out-of-the-box, but what if users want to post-process the output and highlight it?
Just some food for thought.
@Alhadis I wasn’t aware of that we can utilize bat
to do the syntax highlighting!
I am adding a new argument (e.g. -h/—syntax-highlighting
) to enable the feature and disable it by default.
Thanks for the comments/thoughts! This is why I created this draft PR!
No problem. IMHO, it might be better to recommend tools like bat
(or any others you know of) in the readme (with links and examples), which would spare you the burdens of keeping htmlq
's highlighting on par with other tools for highlighting source code.
Closing this PR in favor of #18 .
It would be useful for people to interact with the CLI.
For example: