Skip to main content

Crate nu_cli

Crate nu_cli 

Source
Expand description

This crate implements the core functionality of the interactive Nushell REPL and interfaces with reedline. Currently implements the syntax highlighting and completions logic. Furthermore includes a few commands that are specific to reedline

§Internal Nushell crate

This crate implements components of Nushell and is not designed to support plugin authors or other users directly.

Structs§

CompletionEngine
EvaluateCommandsOpts
FileCompletion
NuCompleter
NuHelpCompleter
NuHighlighter
NuValidator
NushellPrompt
The reedline-facing view over some PromptContents.
SemanticSuggestion
StartupLoadContext
Identifies a startup load (path and role).

Enums§

StartupFileKind
Which kind of startup file is being loaded.
SuggestionKind

Functions§

add_cli_context
eval_config_contents
eval_config_contents_with_kind
Evaluate a startup configuration file, using kind only for path-level I/O error framing (missing/unreadable file). Parse/compile/shell errors use the standard reporters via eval_source.
eval_source
evaluate_commands
Run a command (or commands) given to us by the user
evaluate_file
Entry point for evaluating a file.
evaluate_repl
The main REPL loop, including spinning up the prompt itself.
gather_parent_env_vars
report_startup_file_not_found
Report a missing/unreadable startup path without blaming Host Environment Variables.
update_prompt
Re-evaluate $env.PROMPT_COMMAND and friends and install the result as the prompt’s per-cycle baseline. This overwrites anything a background job pushed during the previous cycle, resetting the prompt for the next line.