]> gitweb.fluxo.info Git - keyringer.git/commitdiff
New actions: tree and rm (alias for del)
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 26 Nov 2013 18:18:55 +0000 (16:18 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 26 Nov 2013 18:18:55 +0000 (16:18 -0200)
ChangeLog
lib/keyringer/actions/rm [new symlink]
lib/keyringer/actions/tree [new file with mode: 0755]
lib/keyringer/completions/bash/keyringer
lib/keyringer/completions/zsh/_keyringer
share/man/keyringer.1.mdwn

index 9fe7aa568065613130ee5229280c6f2f863359a1..343d7d6cd1c20aef95b2f02a39e459660559e69a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-11-26 -       Silvio Rhatto  <rhatto@riseup.net>
 
+  Added 'tree' action
+
+  Added 'rm' alias to 'del' action
+
   Set .gitignore during initialization and when using tmp inside the repository
 
   Pass options to git-rm at del action
diff --git a/lib/keyringer/actions/rm b/lib/keyringer/actions/rm
new file mode 120000 (symlink)
index 0000000..1a7ac23
--- /dev/null
@@ -0,0 +1 @@
+del
\ No newline at end of file
diff --git a/lib/keyringer/actions/tree b/lib/keyringer/actions/tree
new file mode 100755 (executable)
index 0000000..2033abd
--- /dev/null
@@ -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"
index bbd49f5eac09f334d3cac2e4cb3e69de3db9dc86..eeda27f25825109916defedbc7c80e3948346e18 100644 (file)
@@ -94,7 +94,7 @@ _keyringer() {
       recipients)
         opts="ls edit"
         ;;
-      ls|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|recrypt|open)
+      ls|tree|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open)
         cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid leading slash
         opts="$(bash -c "set -f && export KEYRINGER_CHECK_VERSION=false && keyringer $instance ls -p -d ${cur}*" 2> /dev/null)"
         ;;
index 5d0a64c5e2276e7f203a0738635f6dcb916d1aad..5717b00f80e781234f67e76fb1655114a719007e 100644 (file)
@@ -50,7 +50,7 @@ _keyringer() {
           recipients)
             compadd "$@" ls edit
             ;;
-          ls|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|recrypt|open)
+          ls|tree|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open)
             words[4]="`echo $words[4] | sed -e "s|^/*||"`" # avoid leading slash
             compadd "$@" $(KEYRINGER_CHECK_VERSION=false keyringer $words[2] ls -p -d $words[4]'*' 2> /dev/null)
             ;;
index d2156d8c1c4b4ca2dcec71aaac588adff9f7102c..d4b71e3ac4c62d4ac91f2cf48417ee02e73aee90 100644 (file)
@@ -56,6 +56,11 @@ ls <*path*>
     if *path* is specified. Like the git wrapper, this is a wrapper around the *LS(1)*
     command.
 
+tree <*path*>
+:   List contents from the toplevel repository *keys* folder or from relative paths
+    if *path* is specified using a tree-like format. Like the ls wrapper, this is a
+    wrapper around the *TREE(1)* command.
+
 # SECRET MANIPULATION ACTIONS
 
 All secret manipulation actions operate upon a *secret* which is the pathname
@@ -88,6 +93,9 @@ del <*secret*>
     To completely remove a file from a keyring, you should also rewrite the Git
     history yourself.
 
+rm <*secret*>
+:   Alias for *del* action.
+
 edit <*secret*>
 :   Edit a secret by temporarily decrypting it, opening the decrypted copy into the 
     text editor defined by the *$EDITOR* environment variable and then re-encrypting it.