m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/contrib/dmenu
diff options
context:
space:
mode:
authorDaniel Lublin <daniel@lublin.se>2017-09-15 10:06:46 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-09-15 15:51:18 +0200
commitc1b3ff04425844ed88fac2a634232bdb8e2662bc (patch)
tree17232dcb07cab3c623d6a88eb9913a45b3bd9a72 /contrib/dmenu
parent65cead8c0fdb07ce3821f6b97bdcb32684d0c3f7 (diff)
passmenu: Don't eat whitespace at beginning/end of password
If IFS (Input Field Separator) is not emptied, read will actually strip spaces and tabs at the beginning/end end of the "line".
Diffstat (limited to 'contrib/dmenu')
-rwxr-xr-xcontrib/dmenu/passmenu2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
index 7a9c517..83268bc 100755
--- a/contrib/dmenu/passmenu
+++ b/contrib/dmenu/passmenu
@@ -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