Functionsยง
- extract_
bash_ command - parse_
shell_ lc_ plain_ commands - Returns the sequence of plain commands within a
bash -lc "..."orzsh -lc "..."invocation when the script only contains word-only commands joined by safe operators. - parse_
shell_ lc_ single_ command_ prefix - Returns the parsed argv for a single shell command in a here-doc style
script (
<<), as long as the script contains exactly one command node. - parse_
shell_ script_ into_ commands - Parses a shell script consisting only of plain commands joined by safe operators.
- try_
parse_ shell - Parse the provided bash source using tree-sitter-bash, returning a Tree on success or None if parsing failed.
- try_
parse_ word_ only_ commands_ sequence - Parse a script which may contain multiple simple commands joined only by
the safe logical/pipe/sequencing operators:
&&,||,;,|.