From c7d4d8a3f75229fff9fa0aff914c1c27f9aa864f Mon Sep 17 00:00:00 2001 From: Bez Hermoso Date: Tue, 22 Oct 2024 17:12:36 -0700 Subject: [PATCH 1/2] fix: use `command cp`: force shell to use command and avoid aliases that may cause interactive prompts --- hooks/base16-hexchat.fish | 2 +- hooks/base16-hexchat.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/base16-hexchat.fish b/hooks/base16-hexchat.fish index 68faaf13..99654a0a 100755 --- a/hooks/base16-hexchat.fish +++ b/hooks/base16-hexchat.fish @@ -54,4 +54,4 @@ end # Execution # ---------------------------------------------------------------------- -cp -f "$hexchat_theme_path" "$BASE16_HEXCHAT_COLORS_CONF_PATH" +command cp -f "$hexchat_theme_path" "$BASE16_HEXCHAT_COLORS_CONF_PATH" diff --git a/hooks/base16-hexchat.sh b/hooks/base16-hexchat.sh index 33c0a3a2..88fbf658 100755 --- a/hooks/base16-hexchat.sh +++ b/hooks/base16-hexchat.sh @@ -12,8 +12,7 @@ if [ -z "$BASE16_HEXCHAT_PATH" ]; then BASE16_HEXCHAT_PATH="${XDG_CONFIG_HOME:-$HOME/.config}/tinted-theming/base16-hexchat" fi -# If BASE16_HEXCHAT_PATH doesn't exist, stop hook -if [ ! -d "$BASE16_HEXCHAT_PATH" ]; then +# If BASE16_HEXCHAT_PATH doesn't exist, stop hook if [ ! -d "$BASE16_HEXCHAT_PATH" ]; then return 2 fi @@ -49,4 +48,5 @@ fi # Execution # ---------------------------------------------------------------------- -cp -f "$hexchat_theme_path" "$BASE16_HEXCHAT_COLORS_CONF_PATH" +command cp -f "$hexchat_theme_path" "$BASE16_HEXCHAT_COLORS_CONF_PATH" + From acde65a64404c5129670f1f50b9f2ff5394d6a22 Mon Sep 17 00:00:00 2001 From: Bez Hermoso Date: Tue, 22 Oct 2024 17:12:58 -0700 Subject: [PATCH 2/2] fix: jqp: fix typo & skip unnecessary `touch` call --- hooks/tinted-jqp.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hooks/tinted-jqp.sh b/hooks/tinted-jqp.sh index 7bd0bbeb..bb1ed7a2 100755 --- a/hooks/tinted-jqp.sh +++ b/hooks/tinted-jqp.sh @@ -10,7 +10,7 @@ TINTED_JQP_PATH="${TINTED_JQP_PATH:-$BASE16_CONFIG_PATH/tinted-jqp}" -# If TINTED_HEXCHAT_PATH doesn't exist, stop hook +# If TINTED_JQP_PATH doesn't exist, stop hook if [ ! -d "$TINTED_JQP_PATH" ]; then return 2 fi @@ -22,10 +22,6 @@ if [[ -d "$TINTED_JQP_CONFIG_FILE" ]]; then return 1 fi -if [ ! -e "$TINTED_JQP_CONFIG_FILE" ]; then - touch "$TINTED_JQP_CONFIG_FILE" -fi - # Set current theme name read current_theme_name < "$BASE16_SHELL_THEME_NAME_PATH"