feat(logging): gate scrollback capture in smart_exit under C5 guard
This commit is contained in:
@@ -48,6 +48,8 @@ function smart_exit --description 'Capture colorized scrollback before exiting,
|
||||
return 0
|
||||
end
|
||||
|
||||
# C5 — Logging & Capture: skip all capture when logging is disabled
|
||||
if __fish_config_op_enabled __fish_config_op_logging
|
||||
set -l snapshot_dir (set -q SCROLLBACK_HISTORY_DIR; and echo $SCROLLBACK_HISTORY_DIR; or echo "$HOME/.terminal_history")
|
||||
set -l max_files (set -q SCROLLBACK_HISTORY_MAX_FILES; and echo $SCROLLBACK_HISTORY_MAX_FILES; or echo 100)
|
||||
|
||||
@@ -92,6 +94,7 @@ function smart_exit --description 'Capture colorized scrollback before exiting,
|
||||
echo -e "$c_warn""➔""$c_reset Exiting discreetly; $c_bold""no history logs saved.""$c_reset"
|
||||
sleep 0.4
|
||||
end
|
||||
end
|
||||
|
||||
# Call the true system exit directly
|
||||
builtin exit
|
||||
|
||||
Reference in New Issue
Block a user