From 624ca2cc8cf061126fb257b78eb3d201725d99c5 Mon Sep 17 00:00:00 2001 From: Gal Szkolnik Date: Fri, 16 Jul 2021 08:30:11 -0500 Subject: [PATCH] =added option to stay around after pwsh --- shell-loading-snippets/bash | 4 +++- shell-loading-snippets/sh | 4 +++- shell-loading-snippets/zsh | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/shell-loading-snippets/bash b/shell-loading-snippets/bash index 08e60aa..675e6e7 100755 --- a/shell-loading-snippets/bash +++ b/shell-loading-snippets/bash @@ -15,7 +15,9 @@ if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" ]]; then echo 'Starting PowerShell SZcripts...' echo "pwsh" >> /tmp/default_shell pwsh - exit + if [[ ! -f /tmp/keep_shell_after_pwsh ]]; then + exit + fi fi fi echo "continue" >> /tmp/default_shell diff --git a/shell-loading-snippets/sh b/shell-loading-snippets/sh index 08e60aa..675e6e7 100755 --- a/shell-loading-snippets/sh +++ b/shell-loading-snippets/sh @@ -15,7 +15,9 @@ if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" ]]; then echo 'Starting PowerShell SZcripts...' echo "pwsh" >> /tmp/default_shell pwsh - exit + if [[ ! -f /tmp/keep_shell_after_pwsh ]]; then + exit + fi fi fi echo "continue" >> /tmp/default_shell diff --git a/shell-loading-snippets/zsh b/shell-loading-snippets/zsh index 73c3840..52a6661 100755 --- a/shell-loading-snippets/zsh +++ b/shell-loading-snippets/zsh @@ -15,7 +15,9 @@ if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" ]]; then echo 'Starting PowerShell SZcripts...' echo "pwsh" >> /tmp/default_shell pwsh - exit + if [[ ! -f /tmp/keep_shell_after_pwsh ]]; then + exit + fi fi fi echo "continue" >> /tmp/default_shell