aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/shell.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-04-28 09:26:52 +0200
committerHans Bolinder <[email protected]>2017-04-28 09:26:52 +0200
commite984e201381e1c70679b628022a1218d5090ce55 (patch)
tree231a3bf46f34981f4dd44951169a6ac95c83ab53 /lib/stdlib/src/shell.erl
parentb674f7b827dec8fd220b858fba1a7d093594cc0b (diff)
parentee2dde4f7f8508d58a9e1b16da66e26f99cf1cc0 (diff)
downloadotp-e984e201381e1c70679b628022a1218d5090ce55.tar.gz
otp-e984e201381e1c70679b628022a1218d5090ce55.tar.bz2
otp-e984e201381e1c70679b628022a1218d5090ce55.zip
Merge branch 'hasse/stdlib/fix_qlc_bug/OTP-14296'
* hasse/stdlib/fix_qlc_bug/OTP-14296: stdlib: Fix a test in sofs_SUITE debugger: Improve handling of pids, ports, and refs stdlib: Improve handling of pids, ports, and refs in qlc stdlib: Improve the Erlang shell's handling of references
Diffstat (limited to 'lib/stdlib/src/shell.erl')
-rw-r--r--lib/stdlib/src/shell.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index 961f5f8a30..76a2789406 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
@@ -229,8 +229,9 @@ server_loop(N0, Eval_0, Bs00, RT, Ds00, History0, Results0) ->
{Eval_1,Bs0,Ds0,Prompt} = prompt(N, Eval_0, Bs00, RT, Ds00),
{Res,Eval0} = get_command(Prompt, Eval_1, Bs0, RT, Ds0),
case Res of
- {ok,Es0} ->
- case expand_hist(Es0, N) of
+ {ok,Es0,XBs} ->
+ Es1 = lib:subst_values_for_vars(Es0, XBs),
+ case expand_hist(Es1, N) of
{ok,Es} ->
{V,Eval,Bs,Ds} = shell_cmd(Es, Eval0, Bs0, RT, Ds0, cmd),
{History,Results} = check_and_get_history_and_results(),
@@ -276,10 +277,10 @@ get_command(Prompt, Eval, Bs, RT, Ds) ->
fun() ->
exit(
case
- io:scan_erl_exprs(group_leader(), Prompt, 1)
+ io:scan_erl_exprs(group_leader(), Prompt, 1, [text])
of
{ok,Toks,_EndPos} ->
- erl_parse:parse_exprs(Toks);
+ lib:extended_parse_exprs(Toks);
{eof,_EndPos} ->
eof;
{error,ErrorInfo,_EndPos} ->