# Functions
TraceFn logs lexer transitions
.
# Constants
DefaultShell specifies which shell to use for command scripts and sub-shells if none explicitly defined.
FlagHidden marks a command as Hidden
.
FlagPrivate marks a command as Private
.
# Variables
CommandList stores a list of commands.
CommandMap stores a map of commands, keyed by the command name (lower-cased)
.
CurrentRunfile holds the (possibly relative) path to the current (primary or otherwise) Runfile.
CurrentRunfileAbs holds the absolute path to the current (primary or otherwise) Runfile.
CurrentRunfileAbsDir holds the absolute path to the containing folder of the current (primary or otherwise) Runfile.
EnableFnTrace shows parser/lexer fn call/stack
.
EnableRunfileOverride indicates if $RUNFILE env var or '-r | --runfile' arguments are supported in the current mode.
ErrOut is where logs and errors are sent to (generally stderr).
ErrShell is an Error message for missing '.SHELL' attribute
.
IncludeCycleMap tracks included Runfiles to avoid infinite loops.
IncludeEnvCycleMap tracks included .env files to avoid infinite loops.
MainMode extends ShebangMode by auto-invoking the main command
.
Me stores the script name we consider the runfile to be running as.
RunBin holds the absolute path to the run command in use.
RunCycleMap tracks inter-cmd RUNs to avoid infinite loops.
Runfile holds the (possibly relative) path to the primary Runfile.
RunfileAbs holds the absolute path to the primary Runfile.
RunfileAbsDir holds the absolute path to the containing folder of the primary Runfile.
RunfileIsDefault is true if the current Runfile is the default "Runfile"
.
RunfileIsLoaded is true if the runfile has been successfully loaded
.
ShebangMode treats the Runfile as the executable
.
ShowCmdShells shows the command shell in the command's help screen
.
ShowNotices shows NOTICE level logging TODO Support verbose mode, so we can display notices :)
.
ShowScriptTmpDir shows the directory where Command/sub-shell scripts are stored
.
# Structs
Command is an abstraction for a command, allowing us to mix runfile commands and custom comments (help, list, etc).
# Type aliases
CmdFlags captures various options for a command.