Added the ability to have spaces in password names

This commit is contained in:
vanten-s 2024-04-07 22:44:47 +02:00
parent 257086fc08
commit 94827d7696
Signed by: vanten-s
GPG key ID: DE3060396884D3F2
2 changed files with 6 additions and 6 deletions

View file

@ -2,16 +2,16 @@
folder="$(ls ~/.password-store/ | sed -e 's/\.gpg$//' | fuzzel -d)"
if [ -z $folder ];
if [ -z "$folder" ];
then
exit
fi
choice="$(ls ~/.password-store/$folder | sed -e 's/\.gpg$//' | fuzzel -d)"
if [ -z $choice ];
if [ -z "$choice" ];
then
exit
fi
wtype -d 10 "$(pass show $folder/$choice | head -n1)"
wtype -d 10 "$(pass show "$folder/$choice" | head -n1)"

View file

@ -2,7 +2,7 @@
folder="$(ls ~/.password-store/ | sed -e 's/\.gpg$//' | fuzzel -d -i)"
if [ -z $folder ];
if [ -z "$folder" ];
then
exit
else
@ -11,10 +11,10 @@ fi
choice="$(ls ~/.password-store/$folder | sed -e 's/\.gpg$//' | fuzzel -d -i)"
if [ -z $choice ];
if [ -z "$choice" ];
then
exit
else
wtype -d 10 $(pass show $folder/$choice | grep username: | sed 's/username: //')
wtype -d 10 $(pass show "$folder/$choice" | grep username: | sed 's/username: //')
fi