# How to write a nice (complex) console app?

**URL:** <https://rubytalk.org/t/how-to-write-a-nice-complex-console-app/42095>\
**Category:** ruby-talk\
**Created:** [11 November 2007 14:50 UTC](https://rubytalk.org/t/how-to-write-a-nice-complex-console-app/42095 "2007-11-11T14:50:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anansi](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@anansi](https://rubytalk.org/u/anansi)\
**Post date:** [11 November 2007 14:50 UTC](https://rubytalk.org/t/how-to-write-a-nice-complex-console-app/42095/1 "2007-11-11T14:50:03Z")

</div>

Hi,  
how can I do a nice console interface? I wanna do something like this her:

> **···**
>
> -----------------------------------------------------
> 
> > Entry1 |Subitem1 of Entry1 |  
> > Entry2 |Subitem2 of Entry1 |  
> > Entry3 |Subitem3 of Entry1 |  
> > &nbsp;&nbsp;&nbsp;&nbsp;\> \>  
> > &nbsp;&nbsp;&nbsp;&nbsp;\>---------------------------------------|  
> > &nbsp;&nbsp;&nbsp;&nbsp;\>Content of Subitem1 of Entry1 |  
> > &nbsp;&nbsp;&nbsp;&nbsp;\> \>  
> > &nbsp;&nbsp;&nbsp;&nbsp;\> \>  
> > &nbsp;&nbsp;&nbsp;&nbsp;\> \>  
> > &nbsp;&nbsp;&nbsp;&nbsp;\> \>  
> > &nbsp;&nbsp;&nbsp;&nbsp;\> \>  
> > &nbsp;&nbsp;&nbsp;&nbsp;\> \>  
> > -----------|---------------------------------------|
> 
> With the up and down keys I wanna scroll within the three different areas. And with scroll I really mean scroll,e.g. one entry could have 10 subitems which don't fit all at once in this area so with going up & down this area must be redrawn if neccessary. The actually selected entry should also be highlighted...
> 
> And with the left and right keys I wanna jump between the three different areas.
> 
> But I've no idea how to do this task?
> 
> Could someone just point me in the right direction which gem or lib I need? It should be Utf-8 compatible..
> 
> The whole thing shall be working under linux.
> 
> bye

---

<div class="post-metadata">

**Author:** ![Jason\_R](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Jason\_R](https://rubytalk.org/u/Jason_R)\
**Post date:** [11 November 2007 15:00 UTC](https://rubytalk.org/t/how-to-write-a-nice-complex-console-app/42095/2 "2007-11-11T15:00:08Z")

</div>

You want ncurses.

Don't know what's available for ncurses in Ruby though.

Jason

> **···**
>
> On Nov 11, 2007 9:50 AM, kazaam \<kazaam@oleco.net\> wrote:
> 
> > Hi,  
> > how can I do a nice console interface? I wanna do something like this her:
> > 
> > -----------------------------------------------------  
> > \>Entry1 |Subitem1 of Entry1 |  
> > \>Entry2 |Subitem2 of Entry1 |  
> > \>Entry3 |Subitem3 of Entry1 |  
> > \> \> \>  
> > \> \>---------------------------------------|  
> > \> \>Content of Subitem1 of Entry1 |  
> > \> \> \>  
> > \> \> \>  
> > \> \> \>  
> > \> \> \>  
> > \> \> \>  
> > \> \> \>  
> > \>-----------|---------------------------------------|
> > 
> > With the up and down keys I wanna scroll within the three different areas.  
> > And with scroll I really mean scroll,e.g. one entry could have 10 subitems  
> > which don't fit all at once in this area so with going up & down this area  
> > must be redrawn if neccessary. The actually selected entry should also be  
> > highlighted...
> > 
> > And with the left and right keys I wanna jump between the three different  
> > areas.
> > 
> > But I've no idea how to do this task?
> > 
> > Could someone just point me in the right direction which gem or lib I  
> > need? It should be Utf-8 compatible..
> > 
> > The whole thing shall be working under linux.
> > 
> > bye

---

<div class="post-metadata">

**Author:** ![anansi](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@anansi](https://rubytalk.org/u/anansi)\
**Post date:** [11 November 2007 15:35 UTC](https://rubytalk.org/t/how-to-write-a-nice-complex-console-app/42095/3 "2007-11-11T15:35:02Z")

</div>

> You want ncurses.
> 
> Don't know what's available for ncurses in Ruby though.
> 
> Jason

thx I found a ncurses-binding for ruby and will give it a try 🙂

> **···**
>
> --  
> kazaam \<kazaam@oleco.net\>
