Skip to content
Browse files

add a reference to the long-winded explanation of getc

  • Loading branch information...
1 parent e658d28 commit 3cbe93ca0508fcd24fe46ce8d57fab48773b132f @jneen committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/util.sh
View
2 lib/util.sh
@@ -32,6 +32,8 @@ pluralize() {
# trimmed="${trimmed%%*( )}"
#}
+# 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 "$@"
}

0 comments on commit 3cbe93c

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