VTE - question about .feed

Hello,

I use .feed on VTE Terminal:

http://ruby-gnome2.sourceforge.jp/hiki.cgi?Vte%3A%3ATerminal#feed

Example:

vte_terminal.feed ‘ata’

I use this for a VTE where I right click on the window, and the .feed
string gets inserted.

But when I press enter, this feed is not interpreted as if I would have
typed it on my own via the keyboard.

If I then type ‘ata’, without the quotes, and press enter, it gets
evaluated. But not so when I used .feed ‘something’

Now my question is:

What is .feed used for? Apparently it is not 100% the same as user
input. :confused:

hi Marc,

i’m not familiar with VTE, but looking at the page you linked, i see
that #feed takes data as an argument, not a string. maybe you want
#feed_child, which takes text as an argument?

  • j

Hmm I suppose so … now I just have to find out why anyone needs to use
.feed … :confused:

If I understand it well, feed is one way, and feed_child is the other.

Let’s assume you are spawning a shell in your terminal. As you type on
the keyboard, terminal sends characters to the shell. The shell echoes
them back to the terminal. The terminal display them. feed is the echo.

(VTE) <=====(feed)===== (shell)
(VTE) ==(feed_child)==> (shell)

It might be confusing since the shell echoes everything by default, so
‘feed_child’ and ‘feed’ feels the same.

Otherwise, I wonder like you if there is any use for this.