From 05606d745f1326d913e940d7b5f609b2618e1b8a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 2 Aug 2024 18:20:47 -0700 Subject: [PATCH] [zsh] Only print tmux sessions for LOGIN shells While playing around with neovide, I learned that processes can reasonably expect non-login shells to print nothing except commands to execute. This change modifies zshrc to only print tmux sessions (something I only care about when I start a shell myself) in LOGIN shells. --- zprofile | 1 - zshrc | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zprofile b/zprofile index 3ab718a..d92467f 100644 --- a/zprofile +++ b/zprofile @@ -3,7 +3,6 @@ zsh_init_profile_functions=( \ connect_ssh_agent \ init_profile_$SYS \ - list_tmux_sessions \ ) do_init_functions zsh_init_profile_functions diff --git a/zshrc b/zshrc index 358f8be..9b0e149 100644 --- a/zshrc +++ b/zshrc @@ -14,6 +14,12 @@ zsh_init_rc_functions=( \ init_rc_$SYS \ ) +if [[ -o LOGIN ]]; then + zsh_init_rc_functions+=( + list_tmux_sessions \ + ) +fi + do_init_functions zsh_init_rc_functions autoload -Uz g