summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/tty/mod.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-05-05 22:50:23 +0000
committerGitHub <noreply@github.com>2020-05-05 22:50:23 +0000
commit81ce93574f62d4b117fdd79af65391f30316a457 (patch)
tree951a0578860c6028e2dfff0ca83879001c6b2385 /alacritty_terminal/src/tty/mod.rs
parent04f0bcaf54ed373128ca0f84ee8fcdd8e52bce23 (diff)
downloadalacritty-81ce93574f62d4b117fdd79af65391f30316a457.tar.gz
alacritty-81ce93574f62d4b117fdd79af65391f30316a457.zip
Extend style guideline documentation
Diffstat (limited to 'alacritty_terminal/src/tty/mod.rs')
-rw-r--r--alacritty_terminal/src/tty/mod.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/alacritty_terminal/src/tty/mod.rs b/alacritty_terminal/src/tty/mod.rs
index f3e07eb2..adf2de9d 100644
--- a/alacritty_terminal/src/tty/mod.rs
+++ b/alacritty_terminal/src/tty/mod.rs
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-//! tty related functionality
+//! TTY related functionality.
use std::{env, io};
use terminfo::Database;
@@ -52,14 +52,14 @@ pub trait EventedReadWrite {
fn write_token(&self) -> mio::Token;
}
-/// Events concerning TTY child processes
+/// Events concerning TTY child processes.
#[derive(Debug, PartialEq)]
pub enum ChildEvent {
- /// Indicates the child has exited
+ /// Indicates the child has exited.
Exited,
}
-/// A pseudoterminal (or PTY)
+/// A pseudoterminal (or PTY).
///
/// This is a refinement of EventedReadWrite that also provides a channel through which we can be
/// notified if the PTY child process does something we care about (other than writing to the TTY).
@@ -67,13 +67,13 @@ pub enum ChildEvent {
pub trait EventedPty: EventedReadWrite {
fn child_event_token(&self) -> mio::Token;
- /// Tries to retrieve an event
+ /// Tries to retrieve an event.
///
/// Returns `Some(event)` on success, or `None` if there are no events to retrieve.
fn next_child_event(&mut self) -> Option<ChildEvent>;
}
-// Setup environment variables
+/// Setup environment variables.
pub fn setup_env<C>(config: &Config<C>) {
// Default to 'alacritty' terminfo if it is available, otherwise
// default to 'xterm-256color'. May be overridden by user's config
@@ -83,13 +83,13 @@ pub fn setup_env<C>(config: &Config<C>) {
if Database::from_name("alacritty").is_ok() { "alacritty" } else { "xterm-256color" },
);
- // Advertise 24-bit color support
+ // Advertise 24-bit color support.
env::set_var("COLORTERM", "truecolor");
- // Prevent child processes from inheriting startup notification env
+ // Prevent child processes from inheriting startup notification env.
env::remove_var("DESKTOP_STARTUP_ID");
- // Set env vars from config
+ // Set env vars from config.
for (key, value) in config.env.iter() {
env::set_var(key, value);
}