p-gen/smenu
Freesmenu started as a lightweight and flexible terminal menu generator, but quickly evolved into a powerful and versatile CLI selection tool for interactive or scripting use.
About p-gen/smenu
smenu is a versatile CLI selection tool that functions as a selection filter, akin to how sed is an editing filter. It reads words from standard input or a file and displays them in a scrolling window with various layouts. Users can navigate the cursor using keyboard and mouse to select one or more words. Notably, smenu does not clear the terminal screen; it overlays the selection window at the cursor position without disturbing previous content. It supports UTF-8 encoding, including double-width characters and experimental extended grapheme clusters, with optimal performance on terminals like WezTerm or iTerm. smenu is designed for both interactive use and scripting, and works on any terminal managed by the terminfo database. The project is open source, hosted on GitHub under the p-gen/smenu repository.
Key Features
Pros & Cons
- Lightweight and efficient for terminal use
- No screen clearing preserves terminal history
- Cross-platform: runs on any Unix-like system with terminfo
- Supports modern terminal features like UTF-8 and mouse input
- Flexible layouts and navigation options
- Limited to text-based terminal environments
- Extended grapheme cluster support is experimental and terminal-dependent
- Requires terminfo development platform for building from source
- Not suitable for graphical or web-based interfaces