Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an interface in bash script that uses arrows for navigation?

I am using bunch of scripts all the time and I'm getting tired of always typing the commands in terminal, so I would want to write some sort of user interface. Think of something like "aptitude" with live updates through a loop something like "top". It is a VPS so I cant do it graphical.

All I need is simple menus, moving between items with arrows and such. Is there a good tutorial, is it even possible with bash?

Thanks in advance for your time.

like image 567
nana Avatar asked May 16 '11 15:05

nana


1 Answers

Have a look at the dialog command. It allows you to create visual UI widgets that can handle keyboard (and even mouse) input.

You have options for creating input boxes, menus, text boxes, check boxes and many others.

Think of a mc - like interface, although mc itself is a little more than this.

like image 84
Costi Ciudatu Avatar answered Sep 25 '22 17:09

Costi Ciudatu