aboutsummaryrefslogtreecommitdiff
path: root/lib/keyringer/actions/tree
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-11-26 16:18:55 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-11-26 16:18:55 -0200
commit17bfa3c574c8a44614053410edf06791cb432dbc (patch)
tree659892b220428fef6bb473b9049ec2accb9148bd /lib/keyringer/actions/tree
parentf8641707496199e65eb37384791ff362d7710c72 (diff)
downloadkeyringer-17bfa3c574c8a44614053410edf06791cb432dbc.tar.gz
keyringer-17bfa3c574c8a44614053410edf06791cb432dbc.tar.bz2
New actions: tree and rm (alias for del)
Diffstat (limited to 'lib/keyringer/actions/tree')
-rwxr-xr-xlib/keyringer/actions/tree19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/keyringer/actions/tree b/lib/keyringer/actions/tree
new file mode 100755
index 0000000..2033abd
--- /dev/null
+++ b/lib/keyringer/actions/tree
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# List keys.
+#
+
+# Load functions
+LIB="`dirname $0`/../functions"
+source "$LIB" || exit 1
+
+# Aditional parameters
+CWD="`pwd`"
+
+# Avoid leading slash
+shift
+ARGS="`echo "$*" | sed -e "s|^/*||"`"
+
+# Run list command
+cd "$KEYDIR" && tree $ARGS
+cd "$CWD"