Change: print \n
whith read -s
This commit is contained in:
parent
fc50c96368
commit
7a37871966
2 changed files with 3 additions and 5 deletions
|
@ -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/tty 2>/dev/null || silent_read
|
||||
printf '\n' >/dev/tty
|
||||
IFS= read -rs INPUT </dev/tty 2>/dev/null && printf '\n' >/dev/tty || silent_read
|
||||
else
|
||||
silent_read
|
||||
fi
|
||||
|
|
|
@ -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});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue