aboutsummaryrefslogtreecommitdiff
path: root/files/.config/nnn/plugins/gpgv
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2026-08-20 15:13:47 +0500
committerAnton Bobov <anton@bobov.name>2026-08-20 15:13:47 +0500
commit153c9344e93662984b1a5368a2722c10117db830 (patch)
tree46b44af16387c815ab6c783415ee7dc1b8287a5c /files/.config/nnn/plugins/gpgv
parentccbc3e18f711c39482e9ed6045ed99b4da889a59 (diff)
nnn: update plugins
Diffstat (limited to 'files/.config/nnn/plugins/gpgv')
-rwxr-xr-xfiles/.config/nnn/plugins/gpgv28
1 files changed, 28 insertions, 0 deletions
diff --git a/files/.config/nnn/plugins/gpgv b/files/.config/nnn/plugins/gpgv
new file mode 100755
index 0000000..23e52e7
--- /dev/null
+++ b/files/.config/nnn/plugins/gpgv
@@ -0,0 +1,28 @@
+#!/usr/bin/env sh
+
+# Description: verifies signed files using gpg.
+# includes options for detached signing
+# (in which case it asks for a document to verify)
+# as well as normal signing
+#
+# Note: Uses the current file only [selections not supported]
+#
+# Shell: POSIX compliant
+# Author: wassup05
+
+file=$1
+
+printf "(s)ign/(d)etach-sig [default=s] "
+read -r sig_resp
+
+if [ "$sig_resp" = "d" ]; then
+ printf "Enter document name: "
+ read -r doc_name
+ command gpg --verify "$file" "$doc_name"
+else
+ command gpg --verify "$file"
+fi
+
+printf "\n"
+# shellcheck disable=SC2034
+read -r resp # Waiting for input to go back to nnn