aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdpw9
1 files 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
}