logo

secret

Replacement to pass(1) based on reop(1)git clone https://hacktivis.me/git/secret.git
commit: 80525c39658687f356c6e940124a393c0388dd36
parent 8bd6728101f645ee96b2ace286f5eed67e2c029d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 25 May 2020 17:59:03 +0200

secret: clip first line without newline

Diffstat:

Msecret8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/secret b/secret @@ -6,6 +6,10 @@ basepath="$HOME/.secret-storage" set -e +secret_clip() { + head -n 1 | tr -d '\n' | xclip -i -selection clipboard +} + secret_init() { set -x @@ -80,7 +84,7 @@ secret_dmenu_oath() { export SECRET_FILE="${basepath}/.secret_$RANDOM.txt" secret_dmenu | secret_read "$entry" - oathtool $(cat "${SECRET_FILE}") | xclip -i -selection clipboard + oathtool $(cat "${SECRET_FILE}") | secret_clip shred -u "${SECRET_FILE}" } @@ -90,7 +94,7 @@ secret_dmenu_read() { export SECRET_FILE="${basepath}/.secret_$RANDOM.txt" secret_dmenu | secret_read "$entry" - cat "${SECRET_FILE}" | xclip -i -selection clipboard + cat "${SECRET_FILE}" | secret_clip shred -u "${SECRET_FILE}" }