Skip to main content
The Shell extractor (tree-sitter-bash) maps CST nodes to canonical concepts for sh, bash, and zsh. Function names come from the name field on the function’s word; variable assignments and commands label the same way, so no fallback rules are needed.

Detected concepts

Example

Renaming a function:
old.sh
new.sh
Running differens old.sh new.sh:

Example: change the body

Keep the declaration name and change what it does:
The report groups the value edit under its containing declaration. Use --format=json to inspect the underlying action and context, or --format=llm for a compact report with source locations.

Known limitations

  • Shell support uses the Bash grammar. Zsh-specific syntax may retain error nodes or produce a partial structural comparison.
  • Heredoc bodies are strings; edits inside them report as value changes.
  • Command substitutions and pipelines are structure: a pipeline reordering reports as a reorder of call expressions.