ed521e2e3c542e1cbb455c7439e166dfb74f3b84
tui.sh
Text-based User Interface library for POSIX compliant shells.
#!/bin/sh
. ./tui.sh
# Code...
See examples.
Known issues
Currently I've no idea how to force tput correctly clear screen on sclroll.
- Cant use
tui_selectin subshell e.g.selected=$(tui_select 1 2 3) tui_selectdoesn't work properly on terminal scroll.tui_spin -rdoesn't work properly on terminal scroll.
Roadmap
Functions list may be changed later.
tui_msgmessage box with OK buttontui_selectmenutui_checklistmenu with multiple choicetui_confirmconfirmation menu (yes/no)tui_inputtext inputtui_passwordpassword inputtui_spinspinnertui_progressprogress bartui_printprint formatted texttui_splitscrsplit screentui_termsizeget actual terminal size, set COLUMNS and LINEStui_curposget current terminal cursor positiontui_readcharread characters from keyboardtui_readkeyread keyboard codestui_optvalcli argument parsertui_fallbackfallback to default terminal settings
License
Licensed under The Unlicense, see UNLICENSE.
Description
Languages
Shell
100%