[erlang-patches] [erlang-questions] Redirect -remsh output
Serge Aleynikov
saleyn@REDACTED
Fri Sep 26 14:29:57 CEST 2008
Actually there is a little bug in the patch which is fixed in the
attachment.
I would definitely vote for including this in the OTP distribution!
Serge
Mats Cronqvist wrote:
> Serge Aleynikov wrote:
>> I believe you are right, as tab-expansion works only on some standard
>> modules (e.g. stdlib, kernel, etc) that are in the path on both nodes.
>>
>> So, adding the appropriate rpc:call/4 in both places should fix the
>> issue.
>>
> from the shell;
> io:setopts([{expand_fun,fun(B)->rpc:call(RemoteNode,edlin_expand,expand,[B])
> end}]).
>
> patch;
> --- /home/masse/wrk/user_drv.erl 2008-09-26 11:54:04.000000000 +0200
> +++ /usr/lib/erlang/lib/kernel-2.12.3/src/user_drv.erl 2008-07-20
> 07:14:47.000000000 +0200
> @@ -113,11 +113,7 @@
> case init:get_argument(remsh) of
> {ok,[[Node]]} ->
> RShell = {list_to_atom(Node),shell,start,[]},
> - RGr =
> - group:start(self(), RShell,
> - [{expand_fun,
> -
> fun(B)->rpc:call(Node,edlin_expand,expand,[B]
> - end)}]),
> + RGr = group:start(self(), RShell),
> {RGr,RShell};
> E when E =:= error ; E =:= {ok,[[]]} ->
> {group:start(self(), Shell),Shell}
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: user_drv.erl.patch
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20080926/2365d1bd/attachment.ksh>
More information about the erlang-patches
mailing list