aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_gpg
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_ak_gpg')
-rwxr-xr-xlib/_ak_gpg15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/_ak_gpg b/lib/_ak_gpg
index 4c73188..d8010b2 100755
--- a/lib/_ak_gpg
+++ b/lib/_ak_gpg
@@ -117,3 +117,18 @@ _ak_gpg_key_self_export(){
exit 1
fi
}
+
+_ak_gpg_list_keys(){
+ _ak_gpg --list-keys | grep '^ ' | awk '{print $1}' | tr '\n' ' '
+}
+
+_ak_gpg_select_key(){
+ select x in $(_ak_gpg_list_keys)
+ do
+ echo $x
+ if [ -n "$x" ]
+ then
+ break
+ fi
+ done
+}