Metadata-Version: 2.4
Name: rbtr-lang-bash
Version: 2026.9.0.dev1
Summary: rbtr — Bash language plugin
Keywords: code-search,code-index,tree-sitter,static-analysis,semantic-search,developer-tools,bash,shell
Author: Alejandro Giacometti
Author-email: Alejandro Giacometti <alejandro.giacometti@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Unix Shell
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Indexing
Classifier: Typing :: Typed
Requires-Dist: rbtr==2026.9.0.dev1
Requires-Dist: tree-sitter-bash
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/janrito/rbtr
Project-URL: Repository, https://github.com/janrito/rbtr
Project-URL: Documentation, https://github.com/janrito/rbtr/tree/main/packages/rbtr-lang-bash#readme
Project-URL: Issues, https://github.com/janrito/rbtr/issues
Project-URL: Changelog, https://github.com/janrito/rbtr/releases
Description-Content-Type: text/markdown

# rbtr-lang-bash

Bash / shell support for [rbtr]. **Default** — installed with
core `rbtr`, no extra required.

[rbtr]: https://github.com/janrito/rbtr/tree/main/packages/rbtr#readme

## What it ingests

- **Functions** — both `name() { ... }` and `function name { ... }`
  forms. All functions are top-level (bash has no nesting).
- **Top-level variable assignments** — `MAX=100`, and `alias` names.
- **Imports** — `source file` and `. file` commands.
- **Top-level statements** — every other command, pipeline, conditional and
  loop at the top level becomes an anonymous **doc-section** chunk. A script
  that defines nothing is what it does, so `rsync -a ./build/ "$DEST"` is as
  findable as a function.

Bash has no classes, methods, or module structure, so none are emitted.

## Chunks produced

`scope` is always empty. `name` is the function/variable identifier.

```bash
deploy() { echo deploying; }   # function "deploy"
function setup { ...; }         # function "setup"
MAX=100                         # variable "MAX"
alias ll="ls -l"                # variable "ll"  (the fused `=` is stripped)
source ./env.sh                 # import  "./env.sh"
. /etc/profile                  # import  "/etc/profile"
```

A leading `#` comment run above a function is attached as its
documentation; a `#!/bin/bash` shebang attaches to the first function
only when no blank line separates them.

## Embedded / injected chunks

None. Bash does not embed other languages.

## Grammar & dependencies

Uses the `tree-sitter-bash` grammar. No dependency on other language
plugins.
