diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-21 07:23:17 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-21 07:23:17 -0500 |
commit | 0a7e0122fac5e3c4c0d35c52dea572cc099864ad (patch) | |
tree | 223fdaf48e447caa2f223db27cb556c8c60d0c91 /teleterm/src/cmd/stream.rs | |
parent | 4b4cad4f9c73e0f4ec6aa8e0242b4377fa995d82 (diff) | |
download | teleterm-0a7e0122fac5e3c4c0d35c52dea572cc099864ad.tar.gz teleterm-0a7e0122fac5e3c4c0d35c52dea572cc099864ad.zip |
move extracting term type out of the client
so that we can use the client outside of a direct terminal context
Diffstat (limited to 'teleterm/src/cmd/stream.rs')
-rw-r--r-- | teleterm/src/cmd/stream.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/teleterm/src/cmd/stream.rs b/teleterm/src/cmd/stream.rs index 0ca8dac..643b32a 100644 --- a/teleterm/src/cmd/stream.rs +++ b/teleterm/src/cmd/stream.rs @@ -141,7 +141,9 @@ impl<S: tokio::io::AsyncRead + tokio::io::AsyncWrite + Send + 'static> connect: crate::client::Connector<S>, auth: &crate::protocol::Auth, ) -> Self { - let client = crate::client::Client::stream(connect, auth); + let term_type = + std::env::var("TERM").unwrap_or_else(|_| "".to_string()); + let client = crate::client::Client::stream(&term_type, connect, auth); // TODO: tokio::io::stdin is broken (it's blocking) // see https://github.com/tokio-rs/tokio/issues/589 |