# Packages
Package errs declares error types used as exception causes.
Package evaltest supports testing the Elvish interpreter and libraries.
Package vals contains basic facilities for manipulating values used in the Elvish runtime.
Package vars contains basic types for manipulating Elvish variables.
# Functions
BuildNs returns a helper for building an Ns.
BuildNsNamed returns a helper for building an Ns with the given name.
CallHook runs all the functions in the list "hook", with "args".
CapturePort returns an output [*Port] whose value and byte components are saved separately.
CombineNs returns an *Ns that contains all the bindings from both ns1 and ns2.
FilePort returns an output *Port where the byte component is the file itself, and the value component is converted to an internal channel that writes each value to the file, prepending with a prefix.
ListenInterrupts returns a Context that is canceled when SIGINT or SIGQUIT has been received by the process.
MakePipelineError builds an error from the execution results of multiple commands in a pipeline.
MakeVarFromName creates a Var with a suitable type constraint inferred from the name.
NewEvaler creates a new Evaler.
NewException creates a new Exception.
NewExternalCmd returns a callable that executes the named external command.
NewExternalCmdExit constructs an error for representing a non-zero exit from an external command.
NewGoFn wraps a Go function into an Elvish function using reflection.
NewPwdVar returns a variable who value is synchronized with the path of the current working directory.
NoSuchVariable returns an error representing that a variable can't be found.
PipePort returns an output *Port whose value and byte components are both piped.
PortsFromFiles builds 3 ports from 3 files.
PortsFromStdFiles is a shorthand for calling PortsFromFiles with os.Stdin, os.Stdout and os.Stderr.
Reason returns the Reason field if err is an Exception.
SplitIncompleteQNameNs splits an incomplete qualified variable name into the namespace part and the name part.
SplitQName splits a qualified name into the first namespace segment and the rest.
SplitQNameSegs splits a qualified name into namespace segments.
SplitSigil splits any leading sigil from a qualified variable name.
StringCapturePort is like [ValueCapturePort], but converts value outputs by stringifying them and prepending an output marker.
UnpackCompilationErrors returns the constituent compilation errors if the given error contains one or more compilation errors.
ValueCapturePort returns an output [*Port] whose value and byte components are saved, with bytes saved one string value per line.
# Variables
BlackholeChan is a channel that absorbs all values written to it, suitable as a placeholder output channel.
ClosedChan is a closed channel, suitable as a placeholder input channel.
DevNull is /dev/null, suitable as a placeholder file for either input or output.
DummyInputPort is a port made up from DevNull and ClosedChan, suitable as a placeholder input port.
DummyOutputPort is a port made up from DevNull and BlackholeChan, suitable as a placeholder output port.
DummyPorts contains 3 dummy ports, suitable as stdin, stdout and stderr.
Errors thrown when globbing.
ErrBothTotalAndLessThan is returned by order when both the &total and &less-than options are specified.
Errors thrown when globbing.
ErrDivideByZero is thrown when attempting to divide by zero.
ErrExternalCmdOpts is thrown when an external command is passed Elvish options.
ErrImplicitCdNoArg is thrown when an implicit cd form is passed arguments.
ErrInterrupted is thrown when the execution is interrupted by a signal.
ErrNonExistentEnvVar is raised by the get-env command when the environment variable does not exist.
ErrNoOptAccepted is thrown when a Go function that does not accept any options gets passed options.
ErrNotInSameProcessGroup is thrown when the process IDs passed to fg are not in the same process group.
ErrPortDoesNotSupportValueOutput is thrown when writing to a port that does not support value output.
ErrUncomparable is raised by the compare and order commands when inputs contain uncomparable values.
IsBuiltinSpecial is the set of all names of builtin special forms.
NoArgs is an empty argument list.
NoOpts is an empty option map.
OK is a pointer to a special value of Exception that represents the absence of exception.
# Structs
CallCfg keeps configuration for the (*Evaler).Call method.
Closure is a function defined with Elvish code.
CompilationErrorTag parameterizes [diag.Error] to define [CompilationError].
EvalCfg keeps configuration for the (*Evaler).Eval method.
Evaler provides methods for evaluating code, and maintains state that is persisted between evaluation of different pieces of code.
ExternalCmdExit contains the exit status of external commands.
FailError is an error returned by the "fail" command.
Frame contains information of the current running function, akin to a call frame in native CPU execution.
NoSuchModule encodes an error where a module spec cannot be resolved.
Ns is the runtime representation of a namespace.
NsBuilder is a helper type used for building an Ns.
PipelineError represents the errors of pipelines, in which multiple commands may error.
PluginLoadError wraps a plugin loading error.
Port conveys data stream.
StackTrace represents a stack trace as a linked list of diag.Context.
UnknownOption is thrown by a native function when called with an unknown option.
UnsupportedOptionsError is an error returned by a closure call when there are unsupported options.
WrongArgType is thrown when calling a native function with an argument of the wrong type.
# Interfaces
ByteOutput defines the interface through which builtin commands access the byte output.
Callable wraps the Call method.
Exception represents exceptions.
Nser is anything that can be converted to an *Ns.
ValueOutput defines the interface through which builtin commands access the value output.
# Type aliases
Flow is a special type of error used for control flows.
Inputs is the type that the last parameter of a Go-native function can take.
RawOptions is the type of an argument a Go-native function can take to declare that it wants to parse options itself.