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
--- /dev/null
+del
\ No newline at end of file
--- /dev/null
+#!/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"
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)"
;;
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)
;;
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
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.