diff options
| author | tv <tv@krebsco.de> | 2026-12-01 05:13:36 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 05:13:36 +0000 |
| commit | 60da3a663ed070c1e6c5d2a1b171e316a0395bbd (patch) | |
| tree | c11fcce3cb5480413dce3d1aefa7d05b681b3df6 /share/bash-completion | |
| parent | cd06c0a8ed52e9c251a5f2c0debb6f263ce74705 (diff) | |
enstate: --pack --dry-run, every problem of a source list
Reads every source and writes nothing: every problem, not just the
first, by address, with kind, location and variables, and the source,
as text or JSON (--json): an item the schema has no slot for, a record
in a type without records, a required slot without an item, a location
that doesn't exist, a source that can't be read (with what it said), a
record that isn't JSON. Exit status 1 if there are problems. --pack
itself refuses with the same list; --out isn't for a dry run, --json
only for one. The completion offers accordingly.
Diffstat (limited to 'share/bash-completion')
| -rw-r--r-- | share/bash-completion/completions/enstate | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/bash-completion/completions/enstate b/share/bash-completion/completions/enstate index 8e55c18..dc90101 100644 --- a/share/bash-completion/completions/enstate +++ b/share/bash-completion/completions/enstate @@ -44,7 +44,13 @@ _enstate() { status) options="--json $store" ;; materialize) options="--json $store --sandbox" ;; migrate) options="--json --dry-run $store --sandbox" ;; - pack) options="--out $general --schema" ;; + pack) + # a dry run writes nothing, and only it prints JSON + case $used in + *" --dry-run "* | *" --json "*) options="--dry-run --json $general --schema" ;; + *" --out "*) options="--out $general --schema" ;; + *) options="--out --dry-run --json $general --schema" ;; + esac ;; esac local o candidates= for o in $options; do |
