mirror of
https://github.com/Ascyii/gpg.yazi.git
synced 2026-01-01 02:44:24 -05:00
Check for encrypted and format to space only
This commit is contained in:
7
main.lua
7
main.lua
@@ -29,11 +29,16 @@ return {
|
||||
return info("No file selected")
|
||||
end
|
||||
|
||||
if hovered:match("%.gpg$") then
|
||||
return info("This file is already encrypted")
|
||||
end
|
||||
|
||||
if not default_recipient then
|
||||
return info("No recipient set")
|
||||
end
|
||||
|
||||
local _, err = Command("gpg"):arg("--yes"):arg("--recipient"):arg(default_recipient):arg("--output"):arg(hovered .. ".gpg"):arg("--encrypt"):arg(hovered):output()
|
||||
local _, err = Command("gpg"):arg("--yes"):arg("--recipient"):arg(default_recipient):arg("--output"):arg(hovered ..
|
||||
".gpg"):arg("--encrypt"):arg(hovered):output()
|
||||
if err then
|
||||
return info("Failed to gpg with error: " .. err)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user