Files
daedalus/bash/hello_bash.spec.md
T
nvaldez 85e8342a74 docs: per-script local specs + spec-first change order (SPEC 6.11, 6.12)
Every script gets a complete spec.md sectionized like SPEC.md
(python/src/<name>/spec.md, <name>.spec.md for shell scripts).
Change order becomes spec -> tests -> code. Specs added for
gpgtools, hello, hello_bash; CHANGELOG under Unreleased.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-19 00:54:03 +01:00

1.2 KiB

hello_bash specification

Complete description of bash/hello_bash.sh. The sample bash script of the template: it exercises the SPEC item 6.10 shared interface end to end. Items are cited as hello_bash spec item N.M.

1. Purpose

  • 1.1 Print one hello line per name argument, defaulting to world when no argument is given, and exit via the interface: hello, <name> (from daedalus bash).

2. Behavior

  • 2.1 The script sources daedalus_common.sh once, defines help() (usage text) and main() (the printing), and ends with daedalus_bash_dispatch "$@" (SPEC item 6.10).
  • 2.2 daedalus hello_bash me prints hello, me (from daedalus bash); daedalus hello_bash a b prints one line per name; no arguments prints the line for world.
  • 2.3 help, -h, and --help route to help() and exit 0; every other invocation routes to main unchanged.
  • 2.4 Nothing is read or written; the script takes names only.

3. Testing approach

  • 3.1 bash/tests/test_hello_bash.py runs the script through runners.find_bash() (skip when bash is missing) and covers the default name, multiple names, the help routing, and the completion words.