balrog

A partial drop-in replacement for pass and pass-otp written in POSIX shell.
git clone https://git.stjo.hn/balrog
Log | Files | Refs | README | LICENSE

commit d3fddf59aaaa5da29002dc6af21bce5668bff90c
parent b0839699a40baa9c0f0b97e5c9153595ae155cf4
Author: St John Karp <contact.stjo.hn>
Date:   Thu,  9 Jun 2022 17:11:18 -0400

Don't output a newline character when copying a one-time password

Applied the same fix as I'd done previously for copying regular
passwords.

Diffstat:
Mbalrog | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/balrog b/balrog @@ -126,7 +126,10 @@ while [ -n "$ACTION" ] ; do grep 'otpauth' | sed 's/.*secret=\([a-zA-Z0-9]*\).*/\1/' | oathtool --base32 --totp - | - ([ "$COPY" -eq 1 ] && $CLIP || cat) + ([ "$COPY" -eq 1 ] && + tr -d '\n' | + $CLIP || + cat) # Decrypt and get the first line. else gpg2 --decrypt --quiet "$KEY_FILE" |