diff options
author | Marcus Arendt <[email protected]> | 2014-12-29 10:13:57 +0100 |
---|---|---|
committer | Marcus Arendt <[email protected]> | 2014-12-29 10:13:57 +0100 |
commit | 4f7edc376ee61238699f68c8721ab23ee56eafee (patch) | |
tree | 1f403607afa54044cd2a64c6e545ee564e765b8c /lib/ssh/src | |
parent | bbf2555c6b8112407674c766f7884940669cf069 (diff) | |
parent | f445c0008c389ff06741e5d5a18d6c75861598cf (diff) | |
download | otp-4f7edc376ee61238699f68c8721ab23ee56eafee.tar.gz otp-4f7edc376ee61238699f68c8721ab23ee56eafee.tar.bz2 otp-4f7edc376ee61238699f68c8721ab23ee56eafee.zip |
Merge branch 'lemenkov/use_os_getenv_2'
* lemenkov/use_os_getenv_2:
fix missing include
Start using os:getenv/2 fun
Introduce os:getenv/2
Diffstat (limited to 'lib/ssh/src')
-rw-r--r-- | lib/ssh/src/ssh_connection.erl | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl index c66f810948..e97bf9ceeb 100644 --- a/lib/ssh/src/ssh_connection.erl +++ b/lib/ssh/src/ssh_connection.erl @@ -200,7 +200,7 @@ ptty_alloc(ConnectionHandler, Channel, Options, TimeOut) -> {Width, PixWidth} = pty_default_dimensions(width, Options), {Hight, PixHight} = pty_default_dimensions(hight, Options), pty_req(ConnectionHandler, Channel, - proplists:get_value(term, Options, default_term()), + proplists:get_value(term, Options, os:getenv("TERM", ?DEFAULT_TERMINAL)), proplists:get_value(width, Options, Width), proplists:get_value(hight, Options, Hight), proplists:get_value(pixel_widh, Options, PixWidth), @@ -1299,11 +1299,3 @@ decode_ip(Addr) when is_binary(Addr) -> {error,_} -> Addr; {ok,A} -> A end. - -default_term() -> - case os:getenv("TERM") of - false -> - ?DEFAULT_TERMINAL; - Str when is_list(Str)-> - Str - end. |