zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Saving physical Zle buffers to snapshot escape codes
Date: Tue, 7 Aug 2018 06:44:24 +0200	[thread overview]
Message-ID: <CAKc7PVBcLwcLW6G_dRJ2Q7OFV-0sa5+XWNT4=EzGYsN58-Jkhg@mail.gmail.com> (raw)

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


             reply	other threads:[~2018-08-07  4:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07  4:44 Sebastian Gniazdowski [this message]
2018-08-07 12:27 ` Bart Schaefer
2018-09-19  5:24   ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVBcLwcLW6G_dRJ2Q7OFV-0sa5+XWNT4=EzGYsN58-Jkhg@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).