ruby - How do I create an interactive menu in a terminal? -


i'm trying build terminal application that, when started, take user away prompt , present them screen interactive menu. user able interact in following way:

  1. they start application running my_app terminal. start application , present them root menu.
  2. they use cursor keys navigate around menu , use [enter] key make selection.
  3. when make selection, presented screen/menu when work. when finished work, press key take them root menu.

the key thing i'm after not scrolling view adds more information end. i'd have distinct, encapsulated views navigation hierarchy. problem don't know how produce such view , present user, , dismiss again once they're done. if give me kind of design pattern kind of application, i'll able take there.

fwiw, i'm using ruby , app cross-platform. if that's ask, windows suffice.

i'm linux guy , want suggest ncurses library you. there's ongoing effort port windows. afaik it's going pretty well, please check question.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -