From c21cbb1e98dab897381ee5a64c2102e93d23062a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 15:57:42 +0200 Subject: [PATCH 1/6] tabs --- sh/main.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index f51b918..a1ac540 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -231,23 +231,23 @@ rwx_parse_variables() { #= rt rwx_test() { - local item - set \ - "main" \ - "alias/git" \ - \ - "RWX_MAIN_NAME" \ - \ - "_rwx_code" \ - \ - "rwx_cache" \ - \ - "alias/batcat" \ - "b" - for item in "${@}"; do - echo - rwx_doc "${item}" - done + local item + set \ + "main" \ + "alias/git" \ + \ + "RWX_MAIN_NAME" \ + \ + "_rwx_code" \ + \ + "rwx_cache" \ + \ + "alias/batcat" \ + "b" + for item in "${@}"; do + echo + rwx_doc "${item}" + done } # ╭──────┬─────╮ From 69e71ee1a3c36499938426a81e26671af95a2d0c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 15:59:31 +0200 Subject: [PATCH 2/6] -n --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 85a616f..00ef126 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -6,7 +6,7 @@ #= tma rwx_tmux_attach() { local server="${1}" - if [ "${server}" ]; then + if [ -n "${server}" ]; then tmux -L "${server}" attach-session else rwx_tmux_list @@ -17,7 +17,7 @@ rwx_tmux_attach() { #= tmk rwx_tmux_kill() { local server="${1}" - if [ "${server}" ]; then + if [ -n "${server}" ]; then tmux -L "${server}" kill-server 2>"/dev/null" else rwx_tmux_list From 4b55ac115539596c894b56fa18ffe6b2fd9ff340 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 16:02:10 +0200 Subject: [PATCH 3/6] tabs --- sh/self.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index e2c30f7..8d821dc 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -4,31 +4,31 @@ # show the cached code #= rc rwx_code() { - echo "${_rwx_code}" + echo "${_rwx_code}" } # show the cached aliases #= rca rwx_code_aliases() { - echo "${RWX_ALIASES}" + echo "${RWX_ALIASES}" } # show the cached constants #= rcc rwx_code_constants() { - echo "${RWX_CONSTANTS}" + echo "${RWX_CONSTANTS}" } # show the cached functions #= rcf rwx_code_functions() { - echo "${RWX_FUNCTIONS}" + echo "${RWX_FUNCTIONS}" } # show the cached variables #= rcv rwx_code_variables() { - echo "${_rwx_code_variables}" + echo "${_rwx_code_variables}" } # meta doc From de0dd93a718995134bf4d89f47355d3122b79d1c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 16:03:46 +0200 Subject: [PATCH 4/6] lint/files --- sh/self.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index 8d821dc..4d88414 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -222,10 +222,10 @@ rwx_self_write() { local target="${1}" if [ -n "${target}" ]; then shift - local file text + local file files text text="#! /usr/bin/env sh " - local files="$(rwx_self_subset "${@}")" + files="$(rwx_self_subset "${@}")" while IFS= read -r file; do text="${text} $(cat "${RWX_ROOT_SYSTEM}/${file}") From 249aa0b19c92a005461d0744b122c570e1c8963b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 16:05:10 +0200 Subject: [PATCH 5/6] lint/modules --- sh/main.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index a1ac540..75b1815 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -94,11 +94,11 @@ rwx_source() { [ -d "${root}" ] || return 1 local file="${2}" - local count module + local count module modules count=0 __rwx_log "" \ ". ${root}" - local modules="$(rwx_find_shell "${root}" "${file}")" + modules="$(rwx_find_shell "${root}" "${file}")" while IFS= read -r module; do count=$((count + 1)) __rwx_log "$(printf "%02d" "${count}") ${module%.sh}" From 5c5464d4ae8b41e8a519dd5c147946f9f9c371a1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 16:09:46 +0200 Subject: [PATCH 6/6] lint/uid --- sh/tmux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 00ef126..9213e01 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -27,7 +27,9 @@ rwx_tmux_kill() { # list #= tml rwx_tmux_list() { - ls "/tmp/tmux-$(id --user)" + local user_id + user_id="$(id --user)" + ls "/tmp/tmux-${user_id}" } # ╭──────┬───────╮