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
envprefix 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