Pure BASH interactive CLI/TUI menu (single-/multi-select/checkboxes)
This post presents a first version of a pure bash script for creating interactive command-line menus with single-select, multi-select, and checkbox functionality.
First version. To be refactored.
Inspired by
- https://serverfault.com/questions/144939/multi-select-menu-in-bash-script
- partly based on https://www.bughunter2k.de/blog/cursor-controlled-selectmenu-in-bash by Ingo Hollmann
Notes
- This is a hacky first implementation for my shell tools/dotfiles (ZSH).
- The intention is to use it for CLI wizards (my aim is NOT a full-blown curses TUI window interface).
- I converted TPUT to ANSI-sequences to spare command executions (e.g.
tput ed | xxd --plain).
Permission to copy and modify is granted under the Creative Commons Attribution 4.0 license.