Documentation
¶
Overview ¶
Command hail is a shell in pure Go that runs bash scripts.
This file follows src/entry.rs and src/args.rs of brush-shell: the command line of bash, read through ox. A hook of each option records it, so that the options of set and shopt apply in the order of the command line, and "+" turns an option off, as in bash (W27). ox reads each word that starts with "+" as options, takes the value of a letter only from the next word, and lets a lone -o, +o, -O or +O end the command line, as bash does (ox's D53).
startup.go reads the startup files by the name of hail and its mode (D19), and package repl runs the interactive shell.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package arith evaluates the arithmetic of the shell: $((...)), $[...], ((...)), the arithmetic for loop, let, the index of an array, the offset and the length of ${x:offset:length}, and the value of a variable with the integer attribute.
|
Package arith evaluates the arithmetic of the shell: $((...)), $[...], ((...)), the arithmetic for loop, let, the index of an array, the offset and the length of ${x:offset:length}, and the value of a variable with the integer attribute. |
|
Package console is the terminal of the browser build of hail (D20, W19).
|
Package console is the terminal of the browser build of hail (D20, W19). |
|
Package env holds the configuration file of hail, config.yaml, and the directory that holds it, as package env does in usql.
|
Package env holds the configuration file of hail, config.yaml, and the directory that holds it, as package env does in usql. |
|
Package expand expands the words of a command: it turns the text of a word into the fields that the command gets.
|
Package expand expands the words of a command: it turns the text of a word into the fields that the command gets. |
|
internal
|
|
|
cmd/bench
command
Command bench runs a set of scripts under hail, bash and brush, several times each, and prints the time and the memory of each run (W17).
|
Command bench runs a set of scripts under hail, bash and brush, several times each, and prints the time and the memory of each run (W17). |
|
cmd/bench/helper
command
Command helper starts one shell for internal/cmd/bench, and reports what the shell used.
|
Command helper starts one shell for internal/cmd/bench, and reports what the shell used. |
|
cmd/compat
command
Command compat runs the YAML cases of brush under a shell, compares each answer with the golden answer of bash or with the answer that the case gives, and prints how many cases pass, by file (W5).
|
Command compat runs the YAML cases of brush under a shell, compares each answer with the golden answer of bash or with the answer that the case gives, and prints how many cases pass, by file (W5). |
|
cmd/gnutexts
command
Command gnutexts writes the texts of the help of GNU bash 5.3 into two Go files, for the builds of hail with the tag gnubash (D38).
|
Command gnutexts writes the texts of the help of GNU bash 5.3 into two Go files, for the builds of hail with the tag gnubash (D38). |
|
cmd/golden
command
Command golden records the answers of bash to the YAML cases of brush, as golden files (D25).
|
Command golden records the answers of bash to the YAML cases of brush, as golden files (D25). |
|
cmd/probe
command
Command probe checks that the parts hail stands on work when hail is built with TinyGo, as W2 of docs/BACKLOG.md asks.
|
Command probe checks that the parts hail stands on work when hail is built with TinyGo, as W2 of docs/BACKLOG.md asks. |
|
cmd/wasip2tags
command
Command wasip2tags rewrites the build lines of hail so that TinyGo builds hail for WASI preview 2, the target wasip2 (W31).
|
Command wasip2tags rewrites the build lines of hail so that TinyGo builds hail for WASI preview 2, the target wasip2 (W31). |
|
compat
Package compat reads the YAML cases of brush and the golden files that hold the answers of bash to them (D25).
|
Package compat reads the YAML cases of brush and the golden files that hold the answers of bash to them (D25). |
|
Package interp is the interpreter of hail: the state of a shell, and the code that runs the tree of package syntax.
|
Package interp is the interpreter of hail: the state of a shell, and the code that runs the tree of package syntax. |
|
pattern
module
|
|
|
Package proc starts a child process for hail.
|
Package proc starts a child process for hail. |
|
Package repl is the interactive shell of hail: the loop that shows a prompt, reads a command, runs it and shows the next prompt.
|
Package repl is the interactive shell of hail: the loop that shows a prompt, reads a command, runs it and shows the next prompt. |
|
Package syntax reads the text of a bash script into an abstract syntax tree.
|
Package syntax reads the text of a bash script into an abstract syntax tree. |
|
Package vfs is the interface through which hail reaches files (D23).
|
Package vfs is the interface through which hail reaches files (D23). |
|
Command web packs the browser build of a program and its host page into a folder of static files, and serves the folder for a test (D20, D21, W19).
|
Command web packs the browser build of a program and its host page into a folder of static files, and serves the folder for a test (D20, D21, W19). |