Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

backslash- and EOT-safe getc

  • Loading branch information...
commit ea2d74ec3bc6831247689ff421c8b0a57a61d576 1 parent d4d8c79
@jneen authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/util.sh
View
2  lib/util.sh
@@ -33,7 +33,7 @@ pluralize() {
# for an explanation of this getc implementation, see
# http://write.jayferd.us/2011/01/12/bash-adventures-read-a-single-character-even-if-its-a-newline/
getc() {
- IFS= read -d"$(echo -e '\004')" -n1 "$@"
+ IFS= read -r -n1 -d '' "$@"
}
read_until() {

0 comments on commit ea2d74e

Please sign in to comment.
Something went wrong with that request. Please try again.