Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Saving physical Zle buffers to snapshot escape codes



Hello,
would it be hard to snapshot current Zle buffers (basically BUFFER and
POSTDISPLAY) sent to terminal? I.e. with all escape codes used to
drive terminal into e.g. changing color of text. Basically a
"screenshot" feature.

A user asked how to use F-Sy-H as a highlighter like pygments. That's
rather impossible currently, but I thought about at least getting
escaped Zle text into e.g. ZSH_RAW_BUFFER by calling a Zle widget, to
then e.g. use some converter and obtain HTML. This might be useful.
Maybe even pygments-like setup would be possible, Zsh would be started
in background as a server and print-out ZSH_RAW_BUFFER on demand,
after receiving request via zle -F handler.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin



Messages sorted by: Reverse Date, Date, Thread, Author