diff options
Diffstat (limited to 'rofi')
-rw-r--r-- | rofi/bin/rofi_pass.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rofi/bin/rofi_pass.sh b/rofi/bin/rofi_pass.sh index 305143e7..1f768164 100644 --- a/rofi/bin/rofi_pass.sh +++ b/rofi/bin/rofi_pass.sh @@ -39,6 +39,9 @@ get_names() { LC_COLLATE=C sort -f } +# Write a password name to a shell to retrieve it, and read its first line; +# write the name safely to the shell's input rather than as an argument. +# get_password() { name=$1 [ -n "$name" ] || return @@ -53,9 +56,8 @@ get_password() { name=$(get_names | rofi -dmenu -i -only_match -p pass) || exit [ -n "$name" ] || exit -# Write the password name to a shell to retrieve it, read its first line, and -# have xdotool write that as if the keyboard; write the name safely to the -# command's input rather than as an argument. +# Retrieve the chosen password by name; check that we actually got something +# back. # password=$(get_password "$name") || exit [ -n "$password" ] || exit |