feat(set): adds --file flag to input from a file path

This commit is contained in:
Lewis Wynne 2026-02-11 18:27:22 +00:00
parent 59cb09a8e7
commit b89db8dc48
5 changed files with 30 additions and 2 deletions

View file

@ -22,6 +22,7 @@ Aliases:
Flags:
-e, --encrypt Encrypt the value at rest using age
-f, --file string Read value from a file
-h, --help help for set
-i, --interactive Prompt before overwriting an existing key
--safe Do not overwrite if the key already exists
@ -48,6 +49,7 @@ Aliases:
Flags:
-e, --encrypt Encrypt the value at rest using age
-f, --file string Read value from a file
-h, --help help for set
-i, --interactive Prompt before overwriting an existing key
--safe Do not overwrite if the key already exists

3
testdata/set-file-conflict-err.ct vendored Normal file
View file

@ -0,0 +1,3 @@
$ fecho myfile contents
$ pda set key@sfc value --file myfile --> FAIL
FAIL cannot set 'key@sfc': --file and VALUE argument are mutually exclusive

4
testdata/set-file.ct vendored Normal file
View file

@ -0,0 +1,4 @@
$ fecho myfile hello from file
$ pda set key@sf --file myfile
$ pda get key@sf
hello from file