Skip to main content

Module shell

Module shell 

Source

Enums§

ShellError
Errors produced by shell integration commands.

Constants§

ENV_ENTRIES
Static environment variable entries for the ENVIRONMENT section.
EXIT_CODES
Static exit code entries for the EXIT CODES section.
KNOWN_BUILTINS
The fixed set of built-in CLI command names.

Functions§

build_synopsis
Build the roff SYNOPSIS line from a clap Command’s arguments.
cmd_completion
Handler: generate a shell completion script and return it as a String.
cmd_man
Handler: look up a subcommand and return its roff man page.
completion_command
Build the completion clap subcommand.
generate_man_page
Build a complete roff man page string for a CLI subcommand.
man_command
Build the man clap subcommand.
register_shell_commands
Attach the completion and man subcommands to the given root command and return it. Uses the clap v4 builder idiom (consume + return).