Enums§
- Redirect
Op - The operator used in a file redirect.
Functions§
- command_
args - Extract command arguments from a
Commandnode. - command_
args_ from_ words - Extract command arguments from a word slice (all words after the name).
- command_
name - Extract the command name from a
Commandnode. - command_
name_ from_ words - Extract the command name from a word slice.
- has_
expansions - Check whether a node contains command or process substitutions.
- has_
expansions_ in_ slices - Check for expansions in word and redirect slices.
- has_
shell_ expansion_ pattern - Check if a string contains shell expansion patterns (
$(,`,${, or$+ identifier). - has_
unsafe_ file_ redirect - Check if a command node has file output redirects (>, >>) to targets other than safe ones.
- is_
expansion_ node - Returns
trueif the node kind is itself a shell expansion. - is_
harmless_ fallback - Check if a node is a harmless fallback command (for
|| truepatterns). - is_
safe_ heredoc_ substitution - Returns
truewhen a node is a safe heredoc data-passing idiom: a singleSIMPLE_SAFEcommand whose only redirects are quoted heredocs, with no word-level expansions. - is_
safe_ redirect_ target - Check if a redirect target is inherently safe (e.g., /dev/null).
- redirect_
info - Extract the redirect operator and target from a
Redirectnode.