add secret generatiopn function
This commit is contained in:
parent
6fa42a7c2d
commit
fca513c15a
1 changed files with 10 additions and 2 deletions
|
|
@ -9,3 +9,11 @@ vim.api.nvim_create_user_command("SopsEncrypt", function(args)
|
||||||
end, {
|
end, {
|
||||||
desc = "Decrypt current file with sops",
|
desc = "Decrypt current file with sops",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("Secret", function(args)
|
||||||
|
local response = vim.system({ "openssl", "rand", "-base64", "32" }, { text = true }):wait()
|
||||||
|
|
||||||
|
vim.api.nvim_paste(vim.trim(response.stdout), false, -1)
|
||||||
|
end, {
|
||||||
|
desc = "Generate secret",
|
||||||
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue