diff options
Diffstat (limited to 'share')
| -rw-r--r-- | share/bash-completion/completions/enstate | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/share/bash-completion/completions/enstate b/share/bash-completion/completions/enstate index 2900ba1..b0f827e 100644 --- a/share/bash-completion/completions/enstate +++ b/share/bash-completion/completions/enstate @@ -7,7 +7,7 @@ _enstate() { local commands="--plan --apply --stage --status --materialize --migrate --pack" # the settings, and those each command uses local general="--config --unset --print-config" - local settings="$general --state-dir --run-dir --schema --unit" + local settings="$general --state-dir --run-dir --schema --sandbox --unit" local store="$general --state-dir --run-dir --schema" local i w cmd= path= used=" " # bash splits --option=VALUE into --option, =, VALUE @@ -21,7 +21,7 @@ _enstate() { case $w in --plan | --apply | --stage | --status | --materialize | --migrate | --pack) cmd=${w#--} ;; - --out | --config | --unset | --state-dir | --run-dir | --schema | --unit) + --out | --config | --unset | --state-dir | --run-dir | --schema | --sandbox | --unit) used="$used$w " # its value, written apart or with = if [ "${COMP_WORDS[i+1]}" = = ]; then i=$((i + 2)); else i=$((i + 1)); fi ;; @@ -31,18 +31,19 @@ _enstate() { esac done case $prev in - --config | --schema) COMPREPLY=($(compgen -f -- "$cur")); return ;; + --config | --schema | --sandbox) COMPREPLY=($(compgen -f -- "$cur")); return ;; --state-dir | --run-dir | --out) COMPREPLY=($(compgen -d -- "$cur")); return ;; - --unset) COMPREPLY=($(compgen -W "state-dir run-dir schema unit" -- "$cur")); return ;; + --unset) COMPREPLY=($(compgen -W "state-dir run-dir schema sandbox unit" -- "$cur")); return ;; --unit) COMPREPLY=(); return ;; esac local options case $cmd in "") options="$commands -h --help $settings" ;; - plan | stage) options="--json $store" ;; - apply) options="--json $store --unit" ;; - status | materialize) options="--json $store" ;; - migrate) options="--json --dry-run $store" ;; + plan | stage) options="--json $store --sandbox" ;; + apply) options="--json $store --sandbox --unit" ;; + status) options="--json $store" ;; + materialize) options="--json $store --sandbox" ;; + migrate) options="--json --dry-run $store --sandbox" ;; pack) options="--out $general --schema" ;; esac local o candidates= |
