From 531aa618bb2e68b8bac8e67eff18e7f57cc5f2b8 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 29 Nov 2024 23:41:57 +0100 Subject: [PATCH] shell/interactive --- sh/main.sh | 8 -------- sh/shell.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index ac92b40..5b3978e 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -27,14 +27,6 @@ rwx_grep_functions() { cut --delimiter "(" --fields 1 } -# test if active shell is in interactive mode -rwx_shell_interactive() { - case "${-}" in - *i*) ;; - *) return 1 ;; - esac -} - # ╭──────╮ # │ core │ # ╰──────╯ diff --git a/sh/shell.sh b/sh/shell.sh index 87a291a..e1a6ca8 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -62,6 +62,14 @@ rwx_shell_configure() { } rwx_shell_configure +# test if active shell is in interactive mode +rwx_shell_interactive() { + case "${-}" in + *i*) ;; + *) return 1 ;; + esac +} + rwx_shell_prompt() { local date host id local code="${1}"