diff --git a/config.fish b/config.fish index 58857de..1054f75 100644 --- a/config.fish +++ b/config.fish @@ -116,10 +116,15 @@ set -gx SUDO_EDITOR $EDITOR set -gx GPG_TTY (tty) # ────────────────────────── Scrollback History ────────────────────────── -# Directory where scrollback history is saved into log files. -set -gx SCROLLBACK_HISTORY_DIR "$HOME/.terminal_history" -# Maximum number of scrollback history files to keep -set -gx SCROLLBACK_HISTORY_MAX_FILES 100 +# fish-style source of truth (editable via config-settings); exported for the +# POSIX wrappers (paru/yay/tmux/zellij/_prune_terminal_logs) that read them. +set -q __fish_scrollback_history_dir +or set -g __fish_scrollback_history_dir "$HOME/.terminal_history" +set -gx SCROLLBACK_HISTORY_DIR $__fish_scrollback_history_dir + +set -q __fish_scrollback_history_max_files +or set -g __fish_scrollback_history_max_files 100 +set -gx SCROLLBACK_HISTORY_MAX_FILES $__fish_scrollback_history_max_files # Wire up a clean exit function that won't fire on background subshells # Replacing the exit builtin is opinionated (C3 overrides); smart_exit also # guards itself so a live toggle takes effect without restarting the shell.