From 85b21cc6eabf388aecd7bee49f2c6781056740c8 Mon Sep 17 00:00:00 2001 From: randogoth Date: Thu, 5 Feb 2026 07:28:38 +0200 Subject: [PATCH] Revert "fix(shell): disable init logging by default" This reverts commit e4fcf78b091dc375da5cadaf49b484345301cfc6. --- scripts/shell-init.sh | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/scripts/shell-init.sh b/scripts/shell-init.sh index ce620f1..09bf2b3 100644 --- a/scripts/shell-init.sh +++ b/scripts/shell-init.sh @@ -1,22 +1,7 @@ # ---- logging --------------------------------------------------------------- log_shell_init() { - # Disabled by default to avoid noisy permission errors in login shells. - # Enable with: - # export NANUQSAURUS_SHELL_INIT_LOG=1 - # Optionally override the file path: - # export NANUQSAURUS_SHELL_INIT_LOG_FILE="$HOME/.local/state/shell-init.log" - [[ -n "${NANUQSAURUS_SHELL_INIT_LOG:-}" ]] || return 0 - - local uid="${UID:-}" - [[ -n "$uid" ]] || uid="$(id -u 2>/dev/null || echo unknown)" - - local log_file="${NANUQSAURUS_SHELL_INIT_LOG_FILE:-${XDG_STATE_HOME:-$HOME/.local/state}/nanuqsaurus/shell-init-${uid}.log}" - local log_dir="${log_file%/*}" - - mkdir -p "$log_dir" 2>/dev/null || return 0 - # Redirect stderr first so a failing stdout redirection stays silent. - printf '%s\n' "shell-init: $*" 2>/dev/null >>"$log_file" || true + printf '%s\n' "shell-init: $*" >>/tmp/shell-init.log 2>/dev/null || true } # ---- helpers --------------------------------------------------------------- @@ -141,4 +126,4 @@ fi if have bat; then alias cat='bat --style=plain --pager=never' 2>/dev/null -fi +fi \ No newline at end of file