aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-11-14 10:54:55 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-11-14 10:54:55 -0200
commite6f22ac9ccb5112f13d45d99e2ffb173237c4e1c (patch)
tree81f618d265ee7ed2f3d6bbf28851fb079eaf6c02
parentee608b62742a05721256e50d4759da32f8be46fa (diff)
downloadkeyringer-e6f22ac9ccb5112f13d45d99e2ffb173237c4e1c.tar.gz
keyringer-e6f22ac9ccb5112f13d45d99e2ffb173237c4e1c.tar.bz2
Show available keyrings on usage
-rwxr-xr-xlib/keyringer/functions6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index bf2977d..d1bbb1c 100755
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -396,10 +396,16 @@ function keyringer_show_actions {
# Usage
function keyringer_usage {
+ local keyrings="$(ls --color=never `dirname $CONFIG` | sed -e 's/config//' | xargs)"
+
printf "Usage: %s <keyring> <action> [arguments]\n\n" "$BASENAME"
printf "Available commands: \n\n"
keyringer_show_actions | sed -e 's/^/\t/'
printf "\tinit <path> [remote]\n\n" $BASENAME
+
+ if [ ! -z "$keyrings" ]; then
+ printf "Available keyrings: %s \n" "$keyrings"
+ fi
}
# Check recipients