aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-02-22 10:04:51 +0100
committerHans Bolinder <[email protected]>2013-02-22 14:45:46 +0100
commit7dcccee4371477e983f026db9e243cb66900b1ef (patch)
tree4bc8cd1fb24390ac65f114ed7eeba6e8404b6c76
parent5c7fe21f434f15a1005cb0529a64ca8461c83172 (diff)
downloadotp-7dcccee4371477e983f026db9e243cb66900b1ef.tar.gz
otp-7dcccee4371477e983f026db9e243cb66900b1ef.tar.bz2
otp-7dcccee4371477e983f026db9e243cb66900b1ef.zip
[stdlib] Let the shell turn off echo while skipping line
The I/O-server group.erl echoed the skipped line.
-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