Skip to content

Commit 95f8fb1

Browse files
committed
Document #1876 and --value-stdin.
Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent a367734 commit 95f8fb1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,17 @@ The value must be formatted as json.
15591559
15601560
$ sops set ~/git/svc/sops/example.yaml '["an_array"][1]' '{"uid1":null,"uid2":1000,"uid3":["bob"]}'
15611561
1562+
You can also provide the value from a file or stdin:
1563+
1564+
.. code:: sh
1565+
1566+
# Provide the value from a file
1567+
$ echo '{"uid1":null,"uid2":1000,"uid3":["bob"]}' > /tmp/example-value
1568+
$ sops set ~/git/svc/sops/example.yaml --value-file '["an_array"][1]' /tmp/example-value
1569+
1570+
# Provide the value from stdin
1571+
$ echo '{"uid1":null,"uid2":1000,"uid3":["bob"]}' | sops set ~/git/svc/sops/example.yaml --value-stdin '["an_array"][1]'
1572+
15621573
Unset a sub-part in a document tree
15631574
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15641575

0 commit comments

Comments
 (0)