Overview of Reedline design requirements and goals
mainReedline is a feature-rich line editor designed to be language-agnostic, though it is currently the bundled editor for Nushell. It aims to provide a modern REPL experience with support for syntax highlighting, tab completions, configurable prompts, and history.
Core Capabilities
- Cross-platform support: Works on Windows, macOS, and Linux across various terminal emulators (e.g., iTerm2, Windows Terminal, Alacritty, Kitty, Wezterm).
- Extensibility: Provides integration points for syntax highlighting, tab completions, and custom keybindings.
- Unicode awareness: Supports Unicode characters with a focus on left-to-right text flow.
Design Principles
- Reliability: Strives to avoid
panic!by usingResulttypes for system-related errors. The most critical requirement is that the displayed line must always match the submitted line. - Terminal Citizenship: Aims to avoid display artifacts, maintain consistent scroll-back buffers, and handle terminal resizing gracefully.
- Predictability: Defaults are designed to be intuitive and non-surprising.