fishi0x01 / vsh

vsh - HashiCorp Vault interactive shell and cli tool
MIT License
284 stars 12 forks source link

add output formatting option for replace command #88

Closed mattlqx closed 3 years ago

mattlqx commented 3 years ago

my co-worker noted that its hard to share pastes of the replace commands dry-run output because its colorized. supporting a two-line output of changes with +/- prefixed to denote addition and subtraction for each change is better formatted for sharing.

➜ build/vsh_darwin_amd64 -c 'replace -k value myValue KV1/src/a/foo -n'
/KV1/src/a/foo> vmyValue = 1
Skipping write.

➜ build/vsh_darwin_amd64 -c 'replace -k value myValue KV1/src/a/foo -n -o diff'
- /KV1/src/a/foo> value = 1
+ /KV1/src/a/foo> myValue = 1
Skipping write.