diff --git a/lib/read.sh b/lib/read.sh index 39ddc57..1fb168b 100644 --- a/lib/read.sh +++ b/lib/read.sh @@ -11,8 +11,7 @@ silent_read() { if [ "$1" = "noechoback" ]; then # Try `-s` option. *ksh have it that not `--silent`. Therefore, don't try it. if [ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ]; then - IFS= read -rs INPUT /dev/null || silent_read - printf '\n' >/dev/tty + IFS= read -rs INPUT /dev/null && printf '\n' >/dev/tty || silent_read else silent_read fi diff --git a/lib/readline-sync.js b/lib/readline-sync.js index 0d13fda..e117237 100644 --- a/lib/readline-sync.js +++ b/lib/readline-sync.js @@ -238,11 +238,10 @@ exports.question = function(query, options) { options); }; -exports.keyIn = function(message) { +exports.keyIn = function(query) { return _readlineSync( /* jshint eqnull:true */ - message != null ? message : '', + query != null ? query : '', /* jshint eqnull:false */ {keyIn: true}); }; -