diff options
Diffstat (limited to 'share')
| -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 |
