Skip to main content

Module parser_path

Module parser_path 

Source

Enums§

ParserPath
An abstraction over a PathBuf that can have virtual paths (files and directories). Virtual paths always exist and represent a way to ship Nushell code inside the binary without requiring paths to be present in the file system.
ScriptLoadError
Failure modes when loading a file as a Nu script for run.

Constants§

MAX_RUN_SCRIPT_BYTES
Maximum size of a script file the run command will load for parsing.

Functions§

looks_like_text
Heuristic: does bytes look like UTF-8 text a Nu script could be?
read_run_script_file
Read a real filesystem path for run, applying size and text checks.