Skip to main content

Crate clawsh

Crate clawsh 

Source
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 with Shell::run() finally, Shell::exit() should be called before exiting the program to handle any necessary cleanup such as writing history back to file
TrieCompleter
Trie-based completer implementing rustyline::completion::Completer for 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 type command

Type Aliases§

Result
Type alias for Result with the error type set to ClawshError