diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-02-19 23:42:29 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-02-19 23:42:29 -0300 |
commit | 04b03dd14a0abe02f436f86e3d647f97b3e5522b (patch) | |
tree | 43f7a6d8f957f1d2d117b95ef2db73af174a7252 | |
parent | 9b26f57a726ccb582f41c19c7c3bbcef3225c12d (diff) | |
download | keyringer-04b03dd14a0abe02f436f86e3d647f97b3e5522b.tar.gz keyringer-04b03dd14a0abe02f436f86e3d647f97b3e5522b.tar.bz2 |
Adding xclip action thanks to password-store (2)
-rwxr-xr-x | lib/keyringer/actions/xclip | 6 | ||||
-rw-r--r-- | lib/keyringer/completions/bash/keyringer | 2 | ||||
-rw-r--r-- | lib/keyringer/completions/zsh/_keyringer | 2 | ||||
-rw-r--r-- | share/man/keyringer.1.mdwn | 3 |
4 files changed, 11 insertions, 2 deletions
diff --git a/lib/keyringer/actions/xclip b/lib/keyringer/actions/xclip index 414013b..b28984f 100755 --- a/lib/keyringer/actions/xclip +++ b/lib/keyringer/actions/xclip @@ -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" diff --git a/lib/keyringer/completions/bash/keyringer b/lib/keyringer/completions/bash/keyringer index eb8fabd..a640583 100644 --- a/lib/keyringer/completions/bash/keyringer +++ b/lib/keyringer/completions/bash/keyringer @@ -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)" ;; diff --git a/lib/keyringer/completions/zsh/_keyringer b/lib/keyringer/completions/zsh/_keyringer index e889fd8..1a6d8c6 100644 --- a/lib/keyringer/completions/zsh/_keyringer +++ b/lib/keyringer/completions/zsh/_keyringer @@ -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) ;; diff --git a/share/man/keyringer.1.mdwn b/share/man/keyringer.1.mdwn index 1cd7a45..ccaabdf 100644 --- a/share/man/keyringer.1.mdwn +++ b/share/man/keyringer.1.mdwn @@ -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 |