diff --git a/docs/fish-config.1 b/docs/fish-config.1 index 2586315..a5da658 100644 --- a/docs/fish-config.1 +++ b/docs/fish-config.1 @@ -55,8 +55,8 @@ Drop-in replacements for common Unix tools (ls, cat, rm, du, ping, less) Deep Kitty and WezTerm terminal integration: tab/window/pane management from the command line .IP \[bu] 2 -Automatic session logging: terminal scrollback, tmux/zellij panes, and -paru/yay output captured to \[ti]/.terminal_history (on by default; see +Optional session logging: terminal scrollback, tmux/zellij panes, and +paru/yay output captured to \[ti]/.terminal_history (off by default; see below) .IP \[bu] 2 Automatic Python virtualenv activation on directory change @@ -67,21 +67,23 @@ AI scaffolding helpers for Claude Code and Antigravity .IP \[bu] 2 Catppuccin Mocha color theme throughout .PP -CAUTION: \f[B]SESSION LOGGING IS ON BY DEFAULT\f[R] +CAUTION: \f[B]SESSION LOGGING IS OPT-IN\f[R] .PD 0 .P .PD -This configuration silently records terminal output to -\f[V]\[ti]/.terminal_history\f[R]: Kitty scrollback on window close, -live tmux pane streams, zellij pane snapshots on exit, and full paru/yay -output. +Once enabled, this configuration \f[I]can\f[R] silently record terminal +output to \f[V]\[ti]/.terminal_history\f[R]: Kitty scrollback on window +close, live tmux pane streams, zellij pane snapshots on exit, and full +paru/yay output. These logs can contain command output, file contents, and secrets printed to the terminal. Nothing leaves your machine, but the files persist locally. -- Disable all logging with: -\f[V]set -U __fish_config_op_logging off\f[R] - Prefer a menu? -Run the interactive picker: \f[V]config-settings\f[R] - See C5 \[em] -Logging and Capture for the full breakdown. +Logging is off unless you turn it on. +- Enable all logging with: \f[V]set -U __fish_config_op_logging on\f[R] +- Prefer a menu? +Run the interactive picker: \f[V]config-settings\f[R] - Turn it back off +with: \f[V]set -U __fish_config_op_logging off\f[R] (or erase the +variable) - See C5 \[em] Logging and Capture for the full breakdown. .PP The configuration uses a structured file tree: .IP @@ -169,7 +171,7 @@ The configuration uses a structured file tree: 11. Troubleshooting 11.1 Uninstalling and Reverting to Backup 11.2 Fish Version Requirement - 11.3 Disable Session Logging + 11.3 Enable or Disable Session Logging 11.4 Change or Disable the Greeting 11.5 Secrets and Machine-Local Configuration 11.6 Tool Init Does Nothing (Return Sentinel) @@ -3358,12 +3360,18 @@ __fish_variable_check. Set a variable to any falsy value (0, false, no, off, n) to disable its category; erase it or set a truthy value (1, true, yes, on, y) to re-enable. -Unset means enabled. +Unset means enabled \[em] except for C5 logging, which is opt-in (see +below). .PP An explicit per-category truthy value takes precedence over the master switch: setting __fish_config_opinionated=0 disables all unset categories, but a category with an explicit truthy value remains enabled regardless. +.PP +C5 (logging) is the one exception to \[lq]unset means enabled\[rq]. +Because it writes terminal output to disk, it is opt-in: unset means +disabled, and the master switch cannot enable it. +Only an explicit truthy value turns logging on. .IP .nf \f[C] @@ -3391,10 +3399,11 @@ __fish_config_op_integrations Terminal/tool coupling: Kitty/ WezTerm window abbreviations, done notifications, spwin/tab/split, hist, logs, upgrade, WakaTime -__fish_config_op_logging Logging & capture: scrollback - capture on exit, paru/yay AUR log - wrappers, Kitty watcher capture; - sentinel file coordinates +__fish_config_op_logging Logging & capture (OPT-IN \[em] this one + is off unless explicitly enabled): + scrollback capture on exit, paru/yay + AUR log wrappers, Kitty watcher + capture; sentinel file coordinates cross-process state __fish_config_op_greeting Greeting & first-run UI: per-session fish_greeting override (defines empty @@ -3412,10 +3421,13 @@ Examples: # Disable command shadows only (rm becomes plain rm again): set -U __fish_config_op_aliases off +# Turn session logging on (opt-in; off until you do this): +set -U __fish_config_op_logging on + # Full minimal mode \[em] disable all six categories at once: set -U __fish_config_opinionated 0 -# Re-enable everything: +# Re-enable everything (except C5 logging, which stays opt-in): set -Ue __fish_config_opinionated # Minimal mode but keep the greeting: @@ -3596,11 +3608,20 @@ rather than silently failing. .SS C5 \[em] Logging and Capture .PP Five components capture shell output to disk. -Disabling __fish_config_op_logging skips all capture and removes the -logging wrappers. +Unlike every other category, C5 is opt-in: it stays off until +__fish_config_op_logging is set to an explicit truthy value, and a +truthy master switch does not enable it. +While it is off, all capture is skipped and the logging wrappers are +removed. .IP .nf \f[C] +# Turn it on (persistently, in every shell): +set -U __fish_config_op_logging on + +# Turn it back off: +set -U __fish_config_op_logging off # or: set -Ue __fish_config_op_logging + Component What it captures ─────────────────────────────────────────────────────────────────────────── Scrollback capture Terminal session output saved to: @@ -3669,7 +3690,8 @@ the watcher (fish-config-watcher.py) into the Kitty config directory and wires it into kitty.conf via a managed block. Inside Kitty, a non-blocking per-session reminder points first-time users at \f[V]kitty-logging install\f[R] until they install or run -\f[V]kitty-logging dismiss\f[R]. +\f[V]kitty-logging dismiss\f[R]; the reminder is itself gated on C5, so +it stays silent until you enable logging. Install affects new Kitty windows only; runtime disable is still handled by the .logging_disabled sentinel. .PP @@ -3684,7 +3706,11 @@ out-of-process components (the Kitty watcher and all running shells): \f[R] .fi .PP -Disabling __fish_config_op_logging: 1. +Because C5 is off by default, the sentinel is present on a fresh install +\[em] the startup sync in conf.d/logging-events.fish reconciles it on +every shell start, so it appears without any action on your part. +.PP +Disabling __fish_config_op_logging (or leaving it unset): 1. Creates the sentinel immediately in every open shell. 2. Removes \[ti]/.local/bin/paru and \[ti]/.local/bin/yay logging wrappers; @@ -3697,7 +3723,7 @@ smart_exit stops saving scrollback logs. 5. Stops tmux pipe-pane capture in every open fish shell inside tmux. .PP -Re-enabling __fish_config_op_logging: 1. +Enabling __fish_config_op_logging: 1. Removes the sentinel in every open shell. 2. Regenerates paru/yay logging wrappers in \[ti]/.local/bin/. @@ -4162,33 +4188,36 @@ brew install fish .fi .PP For other systems or building from source, see https://fishshell.com. -.SS Disable Session Logging +.SS Enable or Disable Session Logging .PP -Disable all logging and capture (scrollback, tmux/zellij pane logs, AUR -helper wrappers, Kitty watcher): +Session logging is opt-in: it is off until you turn it on. +To enable all logging and capture (scrollback, tmux/zellij pane logs, +AUR helper wrappers, Kitty watcher): .IP .nf \f[C] -set -U __fish_config_op_logging off +set -U __fish_config_op_logging on \f[R] .fi .PP Or toggle it interactively: run \f[V]config-settings\f[R] and flip the Logging row. .PP +Disable it again \[em] either an explicit falsy value or erasing the +variable returns you to the default off state: +.IP +.nf +\f[C] +set -U __fish_config_op_logging off +set -Ue __fish_config_op_logging +\f[R] +.fi +.PP This takes effect immediately in all running shells \[em] no restart needed. The sentinel file, wrapper removal, and pipe-pane teardown happen automatically. .PP -Re-enable: -.IP -.nf -\f[C] -set -Ue __fish_config_op_logging -\f[R] -.fi -.PP See C5 \[em] Logging and Capture for the full component breakdown. .SS Change or Disable the Greeting .PP @@ -4386,7 +4415,7 @@ set -U __fish_config_op_aliases off # C1 set -U __fish_config_op_autoexec off # C2 set -U __fish_config_op_overrides off # C3 set -U __fish_config_op_integrations off # C4 -set -U __fish_config_op_logging off # C5 +set -U __fish_config_op_logging off # C5 (already off by default) set -U __fish_config_op_greeting off # C6 \f[R] .fi