Skip to content

Commit

Permalink
passmenu: Don't eat whitespace at beginning/end of password
Browse files Browse the repository at this point in the history
If IFS (Input Field Separator) is not emptied, read will actually strip
spaces and tabs at the beginning/end end of the "line".
  • Loading branch information
quite authored and zx2c4 committed Sep 15, 2017
1 parent 65cead8 commit c1b3ff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/dmenu/passmenu
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")
if [[ $typeit -eq 0 ]]; then
pass show -c "$password" 2>/dev/null
else
pass show "$password" | { read -r pass; printf %s "$pass"; } |
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
xdotool type --clearmodifiers --file -
fi

0 comments on commit c1b3ff0

Please sign in to comment.