Expand description
clawsh is a simple command-line shell implemented in Rust, designed to provide a basic REPL interface for executing commands, managing history, and supporting features like tab completion and command parsing.
Structs§
- Shell
- Struct representing the state of the shell,
it should be created using
Shell::setup()which will handle all necessary initialization such as setting up the REPL editor and loading history from file, and should be used to run the main REPL loop withShell::run()finally,Shell::exit()should be called before exiting the program to handle any necessary cleanup such as writing history back to file - Trie
Completer - Trie-based completer implementing
rustyline::completion::Completerfor autocompletion of built-in commands and external commands on $PATH
Constants§
- BUILTIN_
COMMANDS - Constant array of the names of the built-in commands, used for autocompletion and
typecommand
Type Aliases§
- Result
- Type alias for
Resultwith the error type set toClawshError