Closed myronmarston closed 6 years ago
I suspect this has to do with one of two things:
1.) the remote node is running under TERM=<something not supporting fancy features>
2.) Erlang treats remote shells differently than local ones somehow
We're not doing anything special with releases to modify the way shells are handled, the only exception is that we set TERM=xterm
if TERM
isn't set, or is set to dumb
- this should support all of those features as far as I'm aware. Do you have the same problem when you run bin/myapp console
or only with the remote console?
bin/myapp console
does indeed fix the issue. FWIW, System.get_env("TERM")
returns xterm
from a remote_console
.
Can you run bin/myapp console
on that same system? If so, does it work as you expect? I'm trying to determine if the problem lies in the TERM variable/host capabilities, or in the way Erlang handles remote shells.
Yes, bin/myapp console
fixes the issue when I run it on the same remote system.
I think this is due to the way Elixir determines whether the current shell is ANSI-capable, i.e. it seems to be that if IO.ANSI.enabled?
is false, then color is disabled. Autocomplete appears to work fine though, at least on macOS, it may not be the case for all platforms though.
Steps to reproduce
bin/<app_name> remote_console
to get an IEx console.map = %{foo: 1}
.map
variable by typingm<TAB>
-- it does not autocompleteap
map.f<TAB>
-- it does not autocompleteoo
Verbose Logs
I don't have this handy, since I'm reporting this after connecting to a running node with
remote_console
. I doubt it's necessary but let me know if you need it.Description of issue
I expect the
remote_console
IEx to work like any other IEx session, which supports auto completion of variables and map keys which are atoms.Also, I've noticed that in
remote_console
, the output is not in color (e.g. syntax highlighting for Elixir data structures, or when printing the help output), but that never bothered me enough to report. Seems related, though: the version of IEx running forremote_console
does not support all the usual features.Ubuntu 12.04, OTP 20, Elixir 1.5.1
rel/config.exs
, as it is often my first troubleshooting question, and you'll save us both time :)I can't find any docs that specifically call out any limitations of
remote_console
. If these are known limitations that can't easily be addressed, it would be nice to document them :).