fishi0x01 / vsh

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

add key selector argument to replace #74

Closed mattlqx closed 3 years ago

mattlqx commented 3 years ago

this adds a -s/--key-selector argument to the replace command. in non-regexp mode, it will specify a complete key to match against. in regexp mode, if the key selector yields any matches it will be considered be successful. in this case, replacements will be evaluated against that key-value pair. the key selector match will also be highlighted in the display.

this pull also fixes two issues:

Screen Shot 2021-02-05 at 20 25 27

after confirmation:

Screen Shot 2021-02-05 at 20 25 55
fishi0x01 commented 3 years ago

Fixes #72

As usual, this looks amazing @mattlqx. Thank you :bow:

One little remark: Codeclimate is complaining about formatting. Can you run gofmt -w cli/search.go to format the code?