Skip to content

Commit d9be059

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

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

README.rst

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

0 commit comments

Comments
 (0)