# VTE - question about .feed

**URL:** <https://www.ruby-forum.com/t/vte-question-about-feed/210366>\
**Category:** Ruby-Gnome 2\
**Created:** [August 5, 2011, 7:11pm UTC](https://www.ruby-forum.com/t/vte-question-about-feed/210366 "2011-08-05T19:11:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [August 5, 2011, 7:11pm UTC](https://www.ruby-forum.com/t/vte-question-about-feed/210366/1 "2011-08-05T19:11:42Z")

</div>

Hello,

I use .feed on VTE Terminal:

[http://ruby-gnome2.sourceforge.jp/hiki.cgi?Vte%3A%3ATerminal#feed](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. 😕

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [August 6, 2011, 1:17pm UTC](https://www.ruby-forum.com/t/vte-question-about-feed/210366/2 "2011-08-06T13:17:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [August 18, 2011, 8:16pm UTC](https://www.ruby-forum.com/t/vte-question-about-feed/210366/3 "2011-08-18T20:16:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [August 19, 2011, 11:08am UTC](https://www.ruby-forum.com/t/vte-question-about-feed/210366/4 "2011-08-19T11:08:08Z")

</div>

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.
