diff options
author | 2015-07-24 12:06:52 -0700 | |
---|---|---|
committer | 2015-07-24 12:06:52 -0700 | |
commit | fc625c5cc61696e9268d80b7e1d17b8435579600 (patch) | |
tree | 67c9e301a15bea42622bfaeca7bbe91d84bec93b /contrib/dmenu/passmenu | |
parent | passmenu: Read from stdin when using xdotool to type password (diff) | |
download | password-store-fc625c5cc61696e9268d80b7e1d17b8435579600.tar.xz password-store-fc625c5cc61696e9268d80b7e1d17b8435579600.zip |
passmenu: Only pass first line to xdotool
In 87ec1489fa98, I forgot that some people like to store more than one line in
their password files. We should only pass the first line to xdotool.
Diffstat (limited to 'contrib/dmenu/passmenu')
-rwxr-xr-x | contrib/dmenu/passmenu | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu index 486b663..be85878 100755 --- a/contrib/dmenu/passmenu +++ b/contrib/dmenu/passmenu @@ -20,5 +20,7 @@ password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") if [[ $typeit -eq 0 ]]; then pass show -c "$password" 2>/dev/null else - pass show "$password" | tr -d '\n' | xdotool type --clearmodifiers --file - + pass show "$password" | + awk 'BEGIN{ORS=""} {print; exit}' | + xdotool type --clearmodifiers --file - fi |