fix squashing by looking for 0 newlines instead of 1

This commit is contained in:
Joel Beckmeyer 2021-12-26 21:03:56 -05:00
parent ff0fa5eebd
commit 397354e1ec

View File

@ -91,7 +91,7 @@ password=$(printf '%s\n' "$password_files" | wofi --dmenu)
[ -n "$password" ] || exit [ -n "$password" ] || exit
field_list="$(_parse_fields)" field_list="$(_parse_fields)"
field_count="$(printf '%s' "$field_list" | wc -l)" field_count="$(printf '%s' "$field_list" | wc -l)"
if [ "$squash" -eq 1 ] && [ "$field_count" -eq 1 ]; then if [ "$squash" -eq 1 ] && [ "$field_count" -eq 0 ]; then
field="password" field="password"
elif [ "$autotype" -ne 1 ]; then elif [ "$autotype" -ne 1 ]; then
field=$(printf '%s\n' "$field_list" | wofi --dmenu) field=$(printf '%s\n' "$field_list" | wofi --dmenu)