[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature : walkthrough lines of stdout

From: Raphaël Droz
Subject: Re: Feature : walkthrough lines of stdout
Date: Thu, 18 Jun 2015 18:51:02 -0300
User-agent: Mutt/1.5.23 (2014-03-12)

Just to mention that for urxvt a perl plugin was already posted some
times ago¹. The sad thing is that it has no clue about the "semantic" of
the "last line".
For example you may not want to paste the last line if it's the
prompt. Neither you have the "context" of the output (the last command

I think that readline could be a good layer for that since it can easily
guess what was the entered and validated command and I guess that it
knows where the output ends and where the prompt and other things are..
(actually only the bash process parses the line and can consistently
say that in ...
$ x=y ls foo
... the actual command is "ls")
And the main uses of grabbing the last line come if we know what was the
command they come from (see the regexp in the attachment...)

The missing bit is probably a link between readline "lines" (and states)
and the terminal. The later could then provide
API/configuration/key-bindings to reuse the last

Anyway I have no clue about the means by which, if possible, the
terminal could interact with readline or vice versa.

¹ http://lists.schmorp.de/pipermail/rxvt-unicode/2011q4/001494.html
  Enhanced version attached

On Wed, Jun 17, 2015 at 04:05:56AM -0700, Hrazel wrote:
> Now it would be nice just to log the last lines on stdout and walk it
> through line by line ready to be put to the clipboard.

This is a bit different since here you're intending to *walk* along the
(multiple) previous lines, not only splitting the last one.
Still in the urxvt case, you may want to take inspiration from the
url-select extension while assuming a set of word boundary characters.

Attachment: yank-return
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]