From 215dc2248ad6f6e52d32791dff72b3824b3c891c Mon Sep 17 00:00:00 2001 From: Daniel Shuy Date: Thu, 2 Nov 2023 18:05:43 +0800 Subject: [PATCH] Document the -a/--array argument Signed-off-by: Daniel Shuy --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65f8858..72fb775 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ docker pull boxboat/config-merge docker run --rm boxboat/config-merge -h boxboat/config-merge [-fnh] file1 [file2] ... [fileN] --f, --format json|toml|yaml whether to output json, toml, or yaml. defaults to yaml --n --inline integer depth to start using inline notation at. defaults to 10. set to 0 to disable +-a, --array merge|overwrite|concat whether to merge, overwrite, or concatenate arrays. defaults to merge +-f, --format json|toml|yaml whether to output json, toml, or yaml. defaults to yaml -h --help print the help message files ending in .env and .sh will be sourced and used for environment variable substitution files ending in .json, .js, .toml, .yaml, and .yml will be merged @@ -63,6 +63,8 @@ Files ending in `.json`, `.js`, `.toml`, `.yaml`, and `.yml` are merged together > Source properties that resolve to undefined are skipped if a destination value exists. Array and plain object properties are merged recursively. Other objects and value types are overridden by assignment. Source objects are applied from left to right. Subsequent sources overwrite property assignments of previous sources. +Use the `-a`/`--array` argument to configure the merging behavior for arrays. + ## Patching Files ending in `.patch.json`, `.patch.js`, `.patch.toml`, `.patch.yaml`, and `.patch.yml` are applied as [JSON Patch](http://jsonpatch.com/)