diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sessions.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sessions.rs b/src/sessions.rs index 31c4df4ef..a13c6c7c1 100644 --- a/src/sessions.rs +++ b/src/sessions.rs @@ -3,6 +3,7 @@ use std::time::SystemTime; use std::{fs, io, process}; use zellij_utils::{ consts::ZELLIJ_SOCK_DIR, + envs, interprocess::local_socket::LocalSocketStream, ipc::{ClientToServerMsg, IpcSenderWithContext}, }; @@ -66,7 +67,7 @@ fn assert_socket(name: &str) -> bool { } pub(crate) fn print_sessions(sessions: Vec<String>) { - let curr_session = std::env::var("ZELLIJ_SESSION_NAME").unwrap_or_else(|_| "".into()); + let curr_session = envs::get_session_name().unwrap_or_else(|_| "".into()); sessions.iter().for_each(|session| { let suffix = if curr_session == *session { " (current)" @@ -78,7 +79,7 @@ pub(crate) fn print_sessions(sessions: Vec<String>) { } pub(crate) fn print_sessions_with_index(sessions: Vec<String>) { - let curr_session = std::env::var("ZELLIJ_SESSION_NAME").unwrap_or_else(|_| "".into()); + let curr_session = envs::get_session_name().unwrap_or_else(|_| "".into()); for (i, session) in sessions.iter().enumerate() { let suffix = if curr_session == *session { " (current)" |