aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-02-22 14:46:11 +0100
committerHans Bolinder <[email protected]>2013-02-22 14:46:11 +0100
commit7ad014ac10d87f520d031a9d969473a6bfe20bee (patch)
tree4bc8cd1fb24390ac65f114ed7eeba6e8404b6c76 /lib
parent5c7fe21f434f15a1005cb0529a64ca8461c83172 (diff)
parent7dcccee4371477e983f026db9e243cb66900b1ef (diff)
downloadotp-7ad014ac10d87f520d031a9d969473a6bfe20bee.tar.gz
otp-7ad014ac10d87f520d031a9d969473a6bfe20bee.tar.bz2
otp-7ad014ac10d87f520d031a9d969473a6bfe20bee.zip
Merge branch 'hb/stdlib/shell_improvement/OTP-10659'
* hb/stdlib/shell_improvement/OTP-10659: [stdlib] Let the shell turn off echo while skipping line
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/src/shell.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index 96f3e5dd32..c6c706c3a7 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
@@ -283,7 +283,12 @@ get_command(Prompt, Eval, Bs, RT, Ds) ->
eof;
{error,ErrorInfo,_EndPos} ->
%% Skip the rest of the line:
+ Opts = io:getopts(),
+ TmpOpts = lists:keyreplace(echo, 1, Opts,
+ {echo, false}),
+ _ = io:setopts(TmpOpts),
_ = io:get_line(''),
+ _ = io:setopts(Opts),
{error,ErrorInfo};
Else ->
Else