aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Cronqvist <[email protected]>2010-10-22 10:53:32 +0200
committerRichard Carlsson <[email protected]>2011-08-18 15:50:48 +0200
commit73d1959237d0a77dc10f57d83f6c2ed065a90528 (patch)
treef9bcc2f99dec5eefaba6fd3c88620c479e6efdf2
parent82dba8f37f312e8ae0f4b175d8e0a522788571a7 (diff)
downloadotp-73d1959237d0a77dc10f57d83f6c2ed065a90528.tar.gz
otp-73d1959237d0a77dc10f57d83f6c2ed065a90528.tar.bz2
otp-73d1959237d0a77dc10f57d83f6c2ed065a90528.zip
make tab completion work in remote shells
-rw-r--r--lib/kernel/src/user_drv.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/kernel/src/user_drv.erl b/lib/kernel/src/user_drv.erl
index c34f2ddeb0..e33b4830ab 100644
--- a/lib/kernel/src/user_drv.erl
+++ b/lib/kernel/src/user_drv.erl
@@ -117,8 +117,9 @@ server1(Iport, Oport, Shell) ->
{Curr,Shell1} =
case init:get_argument(remsh) of
{ok,[[Node]]} ->
- RShell = {list_to_atom(Node),shell,start,[]},
- RGr = group:start(self(), RShell),
+ ANode = list_to_atom(Node),
+ RShell = {ANode,shell,start,[]},
+ RGr = group:start(self(), RShell, rem_sh_opts(ANode)),
{RGr,RShell};
E when E =:= error ; E =:= {ok,[[]]} ->
{group:start(self(), Shell),Shell}
@@ -134,6 +135,9 @@ server1(Iport, Oport, Shell) ->
%% Enter the server loop.
server_loop(Iport, Oport, Curr, User, Gr).
+rem_sh_opts(Node) ->
+ [{expand_fun,fun(B)-> rpc:call(Node,edlin_expand,expand,[B]) end}].
+
%% start_user()
%% Start a group leader process and register it as 'user', unless,
%% of course, a 'user' already exists.