summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-04-01 18:14:26 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-04-01 18:14:26 -0700
commite62ee8ba1d5d783f29c9b30101b8ba68874c6b12 (patch)
treef9ea70aba826761695e455f90c5056b8807af174 /sh
parent1e7e5bc6323e96df43f606a75ee10478f5287b5d (diff)
better comment location
Diffstat (limited to 'sh')
-rwxr-xr-xsh/prp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/prp b/sh/prp
index 9726ce4..27950e0 100755
--- a/sh/prp
+++ b/sh/prp
@@ -12,10 +12,10 @@ read_pass () {
}
pass_name="${1:-practice_password2}"
+# `| { IFS= read -r p; printf %s "$p"; }` steal from <https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu#n34>, GPL-2.0-or-later; I use this because it is much faster than `| head -n1`
correct_pass="$(pass "$pass_name" | { IFS= read -r p; printf %s "$p";})"
echo "Enter password \"$pass_name\":"
read_pass
-# `| { IFS= read -r p; printf %s "$p"; }` steal from <https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu#n34>, GPL-2.0-or-later; I use this because it is much faster than `| head -n1`
while ! [ "$entered_pass" = "$correct_pass" ]; do
echo "Wrong password, enter again:"
read_pass