feat(config-settings): add Dots link toggle for user-dots symlink

Extract the user-dots symlink logic into the __fish_user_dots_link helper and
add a dedicated __fish_user_dots_symlink toggle, surfaced as a 'Dots link' bool
row on the config-settings Paths page. Unlike the opinionated categories it has
no universal/session split — it acts on a literal path.

Setting it falsy (or toggling off) stops symlink generation and removes any
existing link immediately, honoured regardless of the C2 master switch.
Creation remains a C2 startup side-effect. config.fish now calls the helper.

Docs: README, fish-config.md (C2 table, Paths page, machine-local section),
and fish-config.index updated.
This commit is contained in:
2026-07-04 02:34:20 -04:00
parent 8495cbaa24
commit ec47b0671c
7 changed files with 103 additions and 31 deletions
+15 -2
View File
@@ -1435,8 +1435,9 @@ Add -i (interactive confirmation) to destructive commands:
Sponge — sponge history-scrubbing settings: delay, successful exit
codes, purge-only-on-exit, allow-previously-successful, and
extra sensitive variable-name tokens
Paths — scrollback log directory, scrollback max files, and the
user-dots path
Paths — scrollback log directory, scrollback max files, the
user-dots path, and the user-dots convenience symlink toggle
(Dots link)
Toggle rows use ← → (or h/l) along an OFF ← DEFAULT → ON scale; DEFAULT
erases the variable so the master switch / built-in default applies. Value
@@ -1666,6 +1667,14 @@ custom location with:
Typical uses: additional PATH entries, local aliases, hostname-specific env
vars, work-specific tool configs.
For convenience, a git-ignored `user-dots` symlink in the fish config
directory tracks `$__fish_user_dots_path` so the overlay can be browsed from
`~/.config/fish/`. It is created if missing and repointed if the path changes.
Opt out by setting `__fish_user_dots_symlink` to a falsy value, or toggling
"Dots link" off on the config-settings Paths page — this stops generation and
removes any existing link. It only ever manages a symlink and never clobbers a
real file or directory at that path.
## Secrets and API Keys
$__fish_user_dots_path/secrets.fish
@@ -1831,6 +1840,10 @@ wrapper generation, no automatic venv activation, no WakaTime reporting,
no auto-pull (the PWD handler is never registered), and the user-dots
convenience symlink is not created. The symlink is git-ignored and only ever
managed as a symlink — a real file or directory at that path is left untouched.
The symlink has its own opt-out independent of C2: set __fish_user_dots_symlink
to a falsy value (or toggle "Dots link" off on the config-settings Paths page)
to stop generating it and remove any existing link — honoured even when C2 is
enabled. Managed by the __fish_user_dots_link helper.
The first-run completion marker (__fish_config_first_run_complete) is still
set so the init does not re-run on subsequent shells.