Shell library with powerful & modern UI, features & `.inputrc` support
This library is a modern, pure Go readline shell implementation, with full .inputrc and legacy readline command/option support, and extended with various commands, options and tools commonly found in modern shells. Its architecture and completion system is heavily inspired from Z-Shell. It is used, between others, to power the console library.
Pure Go, almost-only standard library
Cross-platform (Linux / MacOS / Windows)
Full .inputrc support (all commands/options)
Extensive test suite and almost full coverage of core code
Extended list of additional commands/options (edition/completion/history)
(This extract is quite a pity, because its author is not using Emacs and does not know many of its shortcuts)
Undo/redo line history
Keyword switching & selection
Switching various keywords
Using regexp-based selection to grab parts of words (here, URL components)
- Vim selection & movements (basic)
- Vim surround (selection and change)
Selecting/adding/changing surround regions
Surround and change in shellwords, matching brackets, etc.
- Vim registers (with completion)
- History movements/completion/use/search
History movement, completion and some other other widgets
Classic mode & incremental search mode
- Inputrc init file reload
- Multiline edition
This library is now in a release status, as it has underwent several major rewrites and is now considered mostly feature-complete, with a solid testing suite to ensure safe and smooth operation to the best extent possible. New releases will be regularly pushed when bugs are found and corrected.
Key dispatch/flushing, meta-key enable, etc might still contain some bugs/wrong behavior: 30 years of legacy support for 3000 different terminal emulators cannot be done right by me alone.
Please open a PR or an issue if you face any bug, and it will be promptly resolved.
Don't hesitate proposing a new feature or a PR if you deem it to be useful to most users.
@kenshaw for his .inputrc parsing package, which brings much wider compatibility to this library.
chzyer/readline for the Windows I/O code and everything related.
Some of the Vim code is inspired or translated from zsh-vi-mode.