From 415a59bca7ef6764f3a1d46ff12522e0e91c81ca Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 4 Jul 2025 05:10:44 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=E2=88=92ifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/self.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index a7ebca2..dfbe203 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -181,13 +181,14 @@ rwx_self_write() { local file text text="#! /usr/bin/env sh " - rwx_ifs_set - for file in $(rwx_self_subset "${@}"); do + local files="$(rwx_self_subset "${@}")" + while IFS= read -r file; do text="${text} $(cat "${RWX_ROOT_SYSTEM}/${file}") " - done - rwx_ifs_unset + done < Date: Fri, 4 Jul 2025 05:18:15 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=E2=88=92ifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/lint/shellcheck.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sh/lint/shellcheck.sh b/sh/lint/shellcheck.sh index ac8c700..0cbe758 100644 --- a/sh/lint/shellcheck.sh +++ b/sh/lint/shellcheck.sh @@ -3,12 +3,10 @@ rwx_shellcheck() { local file module modules path file="$(mktemp)" modules="$(rwx_find_shell "${root}")" - rwx_ifs_set - for module in ${modules}; do + printf "%s\n" "${modules}" | while IFS= read -r module; do path="${root}/${module}" echo ". \"${path}\"" >>"${file}" done - rwx_ifs_unset rwx_shellcheck_file "${file}" rwx_remove "${file}" } From 222b64f109b32fc2d4e7edfa5648bec2dffb274a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 4 Jul 2025 05:19:37 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=E2=88=92ifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/main.sh | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 75036ef..48e7f08 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -132,23 +132,6 @@ rwx_shell_interactive() { esac } -# ╭──────┬─────╮ -# │ main │ ifs │ -# ╰──────┴─────╯ - -# set internal field separator to line feed -rwx_ifs_set() { - _RWX_IFS="${IFS}" - IFS=" -" -} - -# unset internal field separator -rwx_ifs_unset() { - IFS="${_RWX_IFS}" - unset RWX_IFS -} - # ╭──────┬──────╮ # │ main │ find │ # ╰──────┴──────╯