From d5d871463a959e36c351fdf68cc7b7b060cd7c23 Mon Sep 17 00:00:00 2001 From: Erin Date: Sat, 15 Oct 2022 17:26:04 -0400 Subject: [PATCH] zsh: export remote status to subprocesses --- zsh/.zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index b699c79..2d4cac5 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -55,11 +55,13 @@ function mkcd { mkdir -p $1 && cd $1 } setopt PROMPT_SUBST # Detect if the current session is running on a remote server -if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then +if [ -n "$IS_REMOTE_SESSION" ] || [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then is_remote=1 else is_remote= fi +# export is_remote +export IS_REMOTE_SESSION=$is_remote # Function to get the current branch name function parse_git_branch {