Linux whiptail 或带有菜单和输入的对话框
Linux whiptail or dialog with menu and input together
我想使用 'whiptail' 包在屏幕上同时生成菜单框和输入框。这可能吗?或者也许有对话?我找不到这方面的任何例子。
我想要这样的东西:
菜单项 1
菜单项 2
菜单项 3
如果 none 以上,请输入您自己的:
输入框:
用户可以 select 菜单中的一项或输入他自己的输入。我该怎么做?
(我确实看到了对话框 'inputmenu' 小部件,但是 Ok/rename/cancel 有点笨拙。)
dialog is the closest fit; anything more would require a custom application. Regarding the "Ok/rename/cancel", there is some flexibility (see manual page)中的--inputmenu
选项:
--nocancel
Suppress the "Cancel" button in checklist, inputbox and menu box
modes. A script can still test if the user pressed the ESC key
to cancel to quit.
--extra-label
string
Override the label used for "Extra" buttons. Note: for input-menu widgets, this defaults to "Rename".
我想使用 'whiptail' 包在屏幕上同时生成菜单框和输入框。这可能吗?或者也许有对话?我找不到这方面的任何例子。
我想要这样的东西: 菜单项 1 菜单项 2 菜单项 3
如果 none 以上,请输入您自己的: 输入框:
用户可以 select 菜单中的一项或输入他自己的输入。我该怎么做?
(我确实看到了对话框 'inputmenu' 小部件,但是 Ok/rename/cancel 有点笨拙。)
dialog is the closest fit; anything more would require a custom application. Regarding the "Ok/rename/cancel", there is some flexibility (see manual page)中的--inputmenu
选项:
--nocancel
Suppress the "Cancel" button in checklist, inputbox and menu box modes. A script can still test if the user pressed the ESC key to cancel to quit.
--extra-label
stringOverride the label used for "Extra" buttons. Note: for input-menu widgets, this defaults to "Rename".