Skip to main content

Module command_args

Module command_args 

Source
Expand description

Shared helpers for command-style tool arguments.

Constants§

DISPLAY_COMMAND_KEYS
Ordered argument keys that may carry a shell command string for display.

Functions§

command_session_missing_required_args
command_session_requires_command_safety
command_text
command_words
command_words_after_environment_prefix
Skip an optional env prefix and leading shell environment assignments.
contains_dynamic_shell_syntax
Returns whether a shell command contains syntax whose meaning depends on shell expansion rather than the literal argument text.
environment_prefix_has_injection_keys
Returns whether an env / leading-assignment prefix sets a known config-injection or loader-injection key.
extract_command_text_with_key
Display-only extraction of a shell command string plus the key it came from.
has_indexed_command_parts
interactive_input_text
normalize_indexed_command_args
normalize_shell_args
normalized_command_value
parse_indexed_command_parts
raw_command_text
Extract the raw command string from command_session-style arguments without splitting it into words. This is useful for checking shell syntax that would be lost after shell_words::split, such as redirections and pipes.
session_id_text
session_id_text_from_payload
working_dir_text
working_dir_text_from_payload