Language record
Bash
A shell script is indexed as a program rather than as a wall of text: the file itself is a module symbol named for its own basename, the functions and variables inside it get identities, and every non-builtin command becomes a call edge carrying the line the command name sits on.
The registry row this page is generated from
Read at render time from the same family row the register reads, so nothing in this block can disagree with it.
- Extensions
- .sh, .bash, .zsh
- Registry names
bash- Recorded symbols
- functions · variables · env constants
Relationship types this analyzer constructs
8 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.
| Relationship type | Constructed |
|---|---|
calls | constructed by this analyzer |
extends | ruled absent |
implements | ruled absent |
uses | constructed by this analyzer |
imports | constructed by this analyzer |
exports | constructed by this analyzer |
contains | constructed by this analyzer |
references | constructed by this analyzer |
overrides | constructed by this analyzer |
instantiates | ruled absent |
decorates | ruled absent |
renders | ruled absent |
mixes_in | ruled absent |
part_of | constructed by this analyzer |
8 constructed, 6 not constructed. All 6 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.
What this analyzer does not resolve
- A command whose name is still an unexpanded expression is not a call.
${dotnetPath} --infopublishes no call edge, because the target would be a string no symbol can have; the variable that decides the command is real and gets a read edge instead. The same rule applies inside a damaged region: nothing is emitted from a name the grammar cannot vouch for. - Three relationship types are absent because the language has no construct that produces them — the pinned grammar yields 164 distinct node types across the corpus and none expresses a type declaration or a constructor.
overridesIS emitted, for the one thing bash actually has: a function redefined later in the same file, which happens 57 times across 38 of the 2,747 admitted files. - A variable read is classified rather than assumed.
isAssignedInFileis set only when this file assigns the name, and the flag's absence means the name arrives from the environment or another file rather than that the read was skipped — 19,417 reads classified corpus-wide, 74.9% assigned in the file that reads them.
Every line above was written against Bash’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.
Where you meet it in a repository
Recognised by extension — .sh, .bash, .zsh. Everything below is about where those files actually sit in a working repository.
- The script is the module, extension included:
tools.shis the module namedtools.sh, so a sourced library and the script that sources it are two real owners rather than one anonymous namespace. The previous shape wrote the literal stringglobalonto hundreds of edges on the pinned corpus, and no stored symbol can ever resolve that name. sourceand.publish both an import and a reference with the path kept exactly as written, because bash resolves a relativesourceagainst the working directory at run time. An earlier version resolved it against the sourcing file's directory and was measurably wrong.- Routing covers any extensionless file whose shebang is a shell, which is how nvm, libexec/rbenv and several hundred other entry-point scripts are visible at all.
Questions this index answers
Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.
- Which functions does this script define, and which one redefines an earlier one?
- Which variable does this script read that it never assigns anywhere?
- What does this script source, and what does it export to a caller?
- Which command does this script run that no function in the repo defines?
What the analyzer sees in code like this
#!/usr/bin/env bash
set -euo pipefail
: "${DEPLOY_ENV:?DEPLOY_ENV must be set}" # bb records: a read of DEPLOY_ENV
DEPLOY_ENV=staging # bb records: variable DEPLOY_ENV
rollback() { # bb records: function rollback on this script
./restore.sh --env "$DEPLOY_ENV" # bb records: calls restore.sh — a binary, not a symbol
}
export -f rollback # bb records: exports rollback, with the export formSymbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.
Languages that turn up in the same repository
Scripting & shell — the count beside each name is how many relationship types that family’s analyzer constructs.
The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Bash, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.