From 04154746f58048bf08368b6b71a7950ad7271cc3 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Mon, 25 Oct 2021 17:55:04 -0400 Subject: Remove '\n' from typed/copied passwds and otps --- dpw | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dpw b/dpw index f8d0a77..4d93a9b 100755 --- a/dpw +++ b/dpw @@ -102,6 +102,7 @@ copy() { pth="$1"; shift "${DPW_BACKEND}" show "$pth" \ | sed 1q \ + | tr -d '\n' \ | xclip -selection "$PASSWORD_STORE_X_SELECTION" sh -c "sleep ${PASSWORD_STORE_CLIP_TIME}; @@ -112,6 +113,7 @@ _type() { pth="$1"; shift "${DPW_BACKEND}" show "$pth" \ | sed 1q \ + | tr -d '\n' \ | xdotool type --delay 2ms --clearmodifiers --file - } @@ -194,13 +196,16 @@ case $a in show) $OTP "$authstring" ;; copy) $OTP "$authstring" \ + | tr -d '\n' \ | xclip -selection "$PASSWORD_STORE_X_SELECTION" sh -c "sleep ${PASSWORD_STORE_CLIP_TIME}; echo '' | xclip -selection '$PASSWORD_STORE_X_SELECTION'" & ;; - type) $OTP "$authstring" | xdotool type --delay 2ms \ - --clearmodifiers --file - + type) + $OTP "$authstring" \ + | tr -d '\n' \ + | xdotool type --delay 2ms --clearmodifiers --file - ;; esac } -- cgit v1.2.3