Bash script with graphical menus

2020-02-10 04:37发布

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.

标签: bash shell menu
2条回答
倾城 Initia
2楼-- · 2020-02-10 05:19

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

查看更多
Viruses.
3楼-- · 2020-02-10 05:21

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

查看更多
登录 后发表回答