Cloud
Cloud

Reputation: 19333

Bash script with graphical menus

I have been writing simple bash scripts for a while now, and I was wondering how I could implement simple menus and, if possible, use menus with color.

In the past, I have written simple C applications that use ncurses and would like to (if possible) have menus in my bash script where the user can use the up/down arrows to select items in a list, and go back/forth through a series of yes/no/cancel prompts.

I am familiar with setting up colored text in bash, so there's a start (eg: bash using colors), so the only requirement left at this point is to see if bash has these capabilities. I would prefer to avoid having to code an application in C/C++ for this, as I would like to be able to edit it on the fly.

Upvotes: 12

Views: 34751

Answers (3)

Danny Holstein
Danny Holstein

Reputation: 174

I wrote a package I call BashGuiHelper, besides all the standard tasks, it's has awesome tree handling/selections and can be compiled with static FLTK libs or a smaller SO-based version.

Upvotes: 0

Bela Vizer
Bela Vizer

Reputation: 2537

there is a package called dialog, is this relevant to your requirement?

Upvotes: 30

I haven't used this myself, but have you checked out bashsimplecurses? From the documentation, it looks like a possible solution.

Upvotes: 9

Related Questions