smenu is an interactive selection filter for the terminal. It reads text from standard input or a file, presents the available choices in a navigable window, and sends the selected items to standard output. This makes it useful for shell scripts and command pipelines that require user input without the need to construct a dedicated interface.
Unlike full-screen menu programs, smenu displays its selection window at the current cursor position without clearing the terminal or disturbing existing screen contents. It can turn command output, shell history, file listings and other text streams into interactive menus. The selected result can be captured in a shell variable or passed to another command for further processing.
The program supports simple single-item selection as well as more elaborate workflows involving multiple selections and structured text. It is particularly useful for system administrators, developers and users who regularly work with command-line tools and want to add interactive selection to their scripts.
This is free and open source software.
Key Features
- Horizontal, column, line and tabular display layouts.
- Keyboard navigation using arrow keys or vi-style movement commands.
- Mouse navigation and selection, including scrolling and double-click actions.
- Incremental search using prefix, substring or fuzzy matching.
- Multiple selections using tag and pin modes.
- Select individual words, entire rows or columns, consecutive ranges and rectangular blocks.
- Combine different selection methods within the same session.
- Direct-access numbering for selecting items quickly.
- Include or exclude words using regular expressions.
- Customisable word and line delimiters for processing structured input.
- Preserve quoted strings as individual selection items.
- Customisable foreground and background colours, including truecolour support and text attributes.
- UTF-8 support, including double-width characters and experimental extended grapheme cluster handling.
- Vertical and horizontal scrolling for navigating larger selections.
- Configurable window height, text alignment and column formatting.
- Regular expression substitutions for transforming displayed text.
- Configurable selection timeouts and automatic validation.
- Option to remove the selection window after completing an operation.
- Cross-platform support – runs on Linux, macOS, and FreeBSD.
Website: github.com/p-gen/smenu
Support:
Developer: Pierre Gentile
License: Mozilla Public License v2.0
smenu is written in C. Learn C with our recommended free books and free tutorials.
Related Software
| Small Console Menu Utilities | |
|---|---|
| fzf | General-purpose fuzzy finder for your shell |
| percol | Interactive grep tool in your terminal |
| pdmenu | Console menu program |
| sentaku | Pipe at the command line into sentaku, and it presents a full-screen menu |
| pmenu | Dynamic terminal-based menu inspired by dmenu |
| tmenu | Dynamic menu for tty devices |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |



Please read our Comment Policy before commenting.