]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Adding xclip action thanks to password-store (2)
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 20 Feb 2014 02:42:29 +0000 (23:42 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 20 Feb 2014 02:42:29 +0000 (23:42 -0300)
lib/keyringer/actions/xclip
lib/keyringer/completions/bash/keyringer
lib/keyringer/completions/zsh/_keyringer
share/man/keyringer.1.mdwn

index 414013b5842f3ad5da1b4a32972e711c1cefa1ae..b28984f4a571edf78ee5b3766deccbb949ab468c 100755 (executable)
@@ -38,6 +38,12 @@ clip() {
 LIB="`dirname $0`/../functions"
 source "$LIB" || exit 1
 
+# Check for xclip
+if ! which xclip; then
+  echo "fatal: xclip not found"
+  exit 1
+fi
+
 # Get file
 keyringer_get_file "$2"
 
index eb8fabde3bdc457706e2b09b97bedd76d64d1267..a6405839d4edcb889c578a9eeb7f8772b1b19cc7 100644 (file)
@@ -94,7 +94,7 @@ _keyringer() {
       recipients)
         opts="ls edit"
         ;;
-      ls|tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open)
+      ls|tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open|clip|xclip)
         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 e889fd83d26785613179d32adcd373aa46d1b8a9..1a6d8c65b2dff939f7d051d9f7e34f44a548244b 100644 (file)
@@ -50,7 +50,7 @@ _keyringer() {
           recipients)
             compadd "$@" ls edit
             ;;
-          ls|tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open)
+          ls|tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open|clip|xclip)
             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 1cd7a45e8cc16d260d6d287d06f1ddab6d1db1b4..ccaabdf1e05c5cd947c6cced45a5ee028e6348a0 100644 (file)
@@ -150,6 +150,9 @@ recrypt <*secret*>
     into the recipient configuration. If no *secret* is given, all secrets in the repository
     are re-encrypted.
 
+clip <*secret*>, xclip <*secret*>
+:   Copy the first line of a secret to the clipboard, following password-store convention.
+
 # CONFIGURATION ACTIONS
 
 commands