From fbb6e2bb68f3f00be1215f0d2fed76e1f213afc4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 29 Nov 2024 23:56:14 +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 88cc728..261c837 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -31,6 +31,14 @@ rwx_grep_functions() { # │ core │ # ╰──────╯ +# test if active shell is in interactive mode +rwx_shell_interactive() { + case "${-}" in + *i*) ;; + *) return 1 ;; + esac +} + # ╭──────┬─────╮ # │ core │ log │ # ╰──────┴─────╯ diff --git a/sh/shell.sh b/sh/shell.sh index e09fd01..561fcdd 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -62,14 +62,6 @@ 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}"