mainly tmux updates, ssh-askpass w/ pinentry

This commit is contained in:
Arthur Khachaturov 2024-08-24 23:57:32 +03:00
parent 3db255cc32
commit d2d85c8cff
No known key found for this signature in database
GPG key ID: CAC2B7EB6DF45D55
8 changed files with 64 additions and 8 deletions

View file

@ -50,4 +50,4 @@ fi
export GIT_AUTHOR_DATE="${date}"
export GIT_COMMITTER_DATE="${date}"
git commit -am "$@"
git commit -m "$@"

30
.local/bin/scripts/ssh-askpass Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
log() {
echo "$@" >> /home/wzray/out
}
exec {OUTPUT_PIPE}<> <(:)
DESC="${1:-"Please enter your authentication passphrase:"}"
CMD=$(cat <<-EOF
SETDESC $DESC
SETPROMPT
GETPIN
EOF
)
{
while read -r out <&$OUTPUT_PIPE; do
log "$out"
if [[ "$out" = "D "* ]]; then
echo "${out#"D "}"
break
fi
done
} &
pinentry-curses -T "${GPG_TTY}" -C "en_US.UTF-8" -M "en_US.UTF-8" -g <<<"$CMD" >&$OUTPUT_PIPE
# vim: ft=sh