diff --git a/AGENTS.md b/AGENTS.md index dfc87b8..b9111f0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ updates (`update.sh`), post-install test suite (`test.sh`), and CI matrix coveri |------|------| | `get.sh` | curl-pipe bootstrap; auto-stashes local modifications on existing clones before pulling | | `install.sh` | Entry point — profile selection, module orchestration | -| `update.sh` | Tool updates with `--check` mode and PATH shadow detection | +| `update.sh` | Tool updates with `--check` mode, PATH shadow detection, and plugin auto-heal | | `test.sh` | Post-install validation (run after every install and update) | | `lib/utils.sh` | Shared helpers: logging, sudo detection, GitHub release fetching | | `modules/` | Per-concern installers: base, zsh, tmux, neovim, tools | @@ -50,6 +50,14 @@ They are wrapped in `vim.fn.executable('npm') == 1` so hosts without npm (e.g. GPU servers) skip them silently. Do not remove this guard or add new npm-dependent servers outside of it. +## update.sh helpers + +- **`_update_plugin NAME PATH [URL]`** — pulls the plugin at `PATH`; if `PATH` is missing and + `URL` is given, clones it. The zsh-plugins block passes URLs so `update.sh zsh-plugins` + can self-heal machines that missed a plugin install. +- **`_update_std_tool CMD LABEL REPO GNU_ARM [BINARY] [ASSET_PREFIX]`** — covers standard + single-binary GitHub tarball tools (rg, eza, fd, …). + ## Version bump rules - `fix:` commits → patch (`X.Y.Z+1`) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4870284..9e6e395 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.6.7] - 2026-05-07 + +### Fixed +- `tmux/.tmux.conf.local`: gate `extended-keys` and `display-popup` behind + `%if #{>=:#{version},3.2}` so the config loads cleanly on tmux < 3.2 + (e.g. Ubuntu 20.04 system tmux). Both features are silently unavailable + on older installs rather than producing parse errors. +- `modules/neovim.sh`: detect runtime/binary version mismatch on + glibc-pinned hosts. A 0.10+ runtime left alongside a glibc-pinned 0.9.x + binary caused `E15` (`csv.vim` `$'...'` syntax) and osc52 nil-field + errors on every file open. Now checks for the 0.10+ syntax in `csv.vim` + and reinstalls to overwrite the mismatched runtime if found. +- `update.sh` / `lib/utils.sh`: `_update_plugin` now accepts an optional + third URL argument. When the plugin directory is missing and a URL is + provided, it clones the plugin instead of skipping with a warning. The + `zsh-plugins` block in `update.sh` passes URLs for all four zsh plugins, + so `./update.sh zsh-plugins` self-heals machines that received the + dotfiles after a plugin was added (e.g. `fast-syntax-highlighting` missing + on a host that was never re-installed). +- `update.sh`: `_do_update_neovim` no longer tries to restore the legacy + v0.9.5 binary when neovim was never installed on the host. On profiles + that do not install neovim (e.g. `minimal`) on glibc < 2.32 systems, + the update step now skips gracefully instead of failing with a `cp` error + against `/usr/local/man`. + ## [1.6.6] - 2026-05-06 ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index f6e9564..725e813 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -200,6 +200,11 @@ zoxide delta eza uv ruff neovim cheat pre-commit xcape _should_run "toolname" || return 0 ``` +**`_update_plugin NAME PATH [URL]`** — git-pull a cloned plugin. When the directory is +missing and `URL` is provided, clones it instead of skipping. Pass the URL for zsh plugins +(see update.sh `zsh-plugins` block) so that `update.sh zsh-plugins` self-heals a machine +that received the dotfiles after a plugin was added. + **`_update_std_tool` helper** covers standard single-binary GitHub tarball tools: ```bash # Usage: _update_std_tool CMD LABEL REPO GNU_ARM [BINARY] [ASSET_PREFIX] diff --git a/VERSION b/VERSION index ec70f75..400084b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.6 +1.6.7 diff --git a/lib/utils.sh b/lib/utils.sh index bb09581..deab01f 100755 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -354,13 +354,17 @@ _gh_update_binary() { # Update a git-managed plugin directory. # Usage: _update_plugin NAME PATH _update_plugin() { - local name="$1" path="$2" + local name="$1" path="$2" url="${3:-}" if [ -d "$path" ]; then if git -C "$path" pull --quiet --rebase; then log_ok "$name updated" else log_warn "$name: git pull failed — skipping (local changes or network issue?)" fi + elif [ -n "$url" ]; then + log_info "$name: not found — cloning → $path" + git clone "$url" "$path" --quiet + log_ok "$name installed → $path" else log_warn "$name not found at $path — skipping" fi diff --git a/tmux/.tmux.conf.local b/tmux/.tmux.conf.local index 32067cc..304250a 100644 --- a/tmux/.tmux.conf.local +++ b/tmux/.tmux.conf.local @@ -341,12 +341,14 @@ set -g default-terminal "tmux-256color" set -ga terminal-overrides ",xterm-256color:Tc" # modern tmux features +%if #{>=:#{version},3.2} set -g extended-keys on # proper Ctrl+Shift+key sequences +%endif set -g detach-on-destroy off # switch to next session instead of exiting tmux set -g bell-action any # propagate bells from all windows to status bar -# -- fzf session/window switcher ----------------------------------------------- - +# -- fzf session/window switcher (tmux >= 3.2) --------------------------------- +%if #{>=:#{version},3.2} # fuzzy session switcher (requires fzf) bind C-j display-popup -E "tmux list-sessions -F '#{session_name}' | fzf --reverse --prompt='session> ' | xargs -r tmux switch-client -t" @@ -360,6 +362,7 @@ bind g display-popup -E "zoxide query -l | fzf --reverse --prompt='dir> ' | xarg # open new pane in a zoxide frecency-ranked directory bind C-z display-popup -E "zoxide query -l | fzf --reverse --prompt='dir> ' | xargs -r tmux split-window -c" +%endif # replace C-b by C-a instead of using both prefixes # set -gu prefix2 diff --git a/update.sh b/update.sh index 2183798..94eb699 100755 --- a/update.sh +++ b/update.sh @@ -165,7 +165,12 @@ _do_update_neovim() { log_ok "neovim $leg_v already installed (glibc-compatible) — skipping" return fi - # Binary is broken (overwritten by a prior update run). Restore v0.9.5. + # Skip if never installed — update.sh updates existing tools, not installs new ones. + if [ ! -e "$nvim_dest" ]; then + log_info "neovim: not installed on this host — skipping (run install.sh workstation to install)" + return + fi + # Binary exists but is broken (overwritten by a prior update run). Restore v0.9.5. if [ "$ARCH" != "x86_64" ]; then log_warn "neovim: legacy binary only available for x86_64 — skipping" return @@ -411,10 +416,10 @@ if _should_run zsh-plugins; then _check_git_updates "fast-syntax-highlighting" "$ZSH_CUSTOM/plugins/fast-syntax-highlighting" _check_git_updates "fzf-tab" "$ZSH_CUSTOM/plugins/fzf-tab" else - _update_plugin "powerlevel10k" "$ZSH_CUSTOM/themes/powerlevel10k" - _update_plugin "zsh-autosuggestions" "$ZSH_CUSTOM/plugins/zsh-autosuggestions" - _update_plugin "fast-syntax-highlighting" "$ZSH_CUSTOM/plugins/fast-syntax-highlighting" - _update_plugin "fzf-tab" "$ZSH_CUSTOM/plugins/fzf-tab" + _update_plugin "powerlevel10k" "$ZSH_CUSTOM/themes/powerlevel10k" "https://github.com/romkatv/powerlevel10k" + _update_plugin "zsh-autosuggestions" "$ZSH_CUSTOM/plugins/zsh-autosuggestions" "https://github.com/zsh-users/zsh-autosuggestions" + _update_plugin "fast-syntax-highlighting" "$ZSH_CUSTOM/plugins/fast-syntax-highlighting" "https://github.com/zdharma-continuum/fast-syntax-highlighting" + _update_plugin "fzf-tab" "$ZSH_CUSTOM/plugins/fzf-tab" "https://github.com/Aloxaf/fzf-tab" fi fi