Skip to main content

Module commands

Module commands 

Source
Expand description

Command trait and built-in command implementations.

Structs§

BracketCommand
The [ command: evaluate conditional expressions (requires closing ]).
CatCommand
The cat command: concatenate files and/or stdin.
CommandContext
Context passed to command execution.
CommandMeta
Declarative metadata for a command, used by –help and the help builtin.
CommandResult
Result of executing a command.
EchoCommand
The echo command: prints arguments to stdout.
EgrepCommand
egrep — alias for grep -E.
FalseCommand
The false command: always fails (exit code 1).
FgrepCommand
fgrep — alias for grep -F.
FlagInfo
Metadata about a single command flag.
LsCommand
The ls command: list directory contents.
MkdirCommand
The mkdir command: create directories (-p for parents).
PwdCommand
The pwd command: print working directory.
TestCommand
The test command: evaluate conditional expressions.
TouchCommand
The touch command: create empty file or update mtime.
TrueCommand
The true command: always succeeds (exit code 0).

Enums§

FlagStatus
Support status of a command flag.

Traits§

VirtualCommand
Trait for commands that can be registered and executed.

Functions§

format_help
Format help text from CommandMeta for display via --help.
register_default_commands
Register the default set of commands.
unknown_option
Standard error for unrecognized options, matching bash/GNU conventions.

Type Aliases§

ExecCallback
Callback type for sub-command execution (e.g. xargs, find -exec).