Skip to content

fix(zsh): add ~/.local/bin to PATH in .zshenv for uv tool shims - #513

Merged
Data-Wise merged 1 commit into
devfrom
feature/local-bin-path
Sep 5, 2026
Merged

Data-Wise merged 1 commit into
devfrom
feature/local-bin-path

Conversation

@Data-Wise

Copy link
Copy Markdown
Owner

Problem

uv installs tool shims into ~/.local/bin (currently radian and arxiv_latex_cleaner), but nothing in the zsh config put that directory on PATH. The tools were installed yet unreachable by name — uv itself warns about this on every install.

Surfaced while restoring a new Mac: radian (the R console) is listed in the captured machine state and is load-bearing, but would not resolve.

Change

One guarded line in zsh/.zshenv.

  • .zshenv, not .zshrc — so non-interactive shells (scripts, Claude Code) resolve the tools too. This matches the file's own stated purpose: "Use this for: Essential PATH modifications".
  • Guarded with a substring test — .zshenv is sourced for every zsh invocation, so an unconditional prepend would grow PATH once per nested shell.

Verification

  • zsh -n zsh/.zshenv parses
  • Fresh shell: ~/.local/bin present on PATH
  • Sourced 3x in one shell: exactly 1 occurrence (guard works)
  • command -v radian and command -v arxiv_latex_cleaner both resolve

Test suite

zsh/tests/run-all-tests.zsh — 2 passed, 1 failed.

The failure is pre-existing and unrelated: the duplicate-function check flags _log_error() defined in both lib/hooks/pre-commit-template.zsh:39 and lib/hooks/pre-push-template.zsh:37. Confirmed by stashing this change and re-running — identical failure on a clean tree. Not addressed here; worth its own issue.

uv installs tool shims into ~/.local/bin (radian, arxiv_latex_cleaner),
but nothing in the zsh config put that directory on PATH, so the tools
were installed yet unreachable by name.

Placed in .zshenv rather than .zshrc so non-interactive shells (scripts,
Claude Code) resolve them too — matching the file's stated purpose of
holding essential PATH modifications.

Guarded with a substring test because .zshenv is sourced for every zsh
invocation; an unconditional prepend would grow PATH once per nested
shell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Data-Wise
Data-Wise merged commit f8cfa5c into dev Sep 5, 2026
3 checks passed
@Data-Wise
Data-Wise deleted the feature/local-bin-path branch September 5, 2026 01:27
Data-Wise added a commit that referenced this pull request Sep 5, 2026
Version bump for the 5 commits merged to dev since 7.17.1: 2 fixes
(#513 PATH, #499 tap-push GH006), 3 CI/deps changes (#512, #514, #515).
No feat commits -- patch bump.

- package.json, package-lock.json, flow.plugin.zsh (FLOW_VERSION),
  CLAUDE.md, man/man1/*.1 (.TH version line) via scripts/release.sh
- CHANGELOG.md + docs/CHANGELOG.md: new 7.17.2 entry (mirrored, per the
  project's dual-changelog convention)
- docs/index.md: footer version stamp only. The "What's New in
  v7.17.1" banner is left as-is -- it describes actual 7.17.1
  user-facing features, and 7.17.2 has none to add (pure CI/infra).

Test-run side effects (.STATUS wins/streak counters, a test fixture's
timestamp) surfaced as unrelated dirty files from running
./tests/run-all.sh and were excluded from this commit.
@Data-Wise Data-Wise mentioned this pull request Sep 5, 2026
Data-Wise added a commit that referenced this pull request Sep 5, 2026
.STATUS had not been touched since 2026-07-07 (f740eb5): the header still
read Phase: Released (v7.16.0) while v7.17.0, v7.17.1 and v7.17.2 had all
shipped, and Focus: held the literal string "--help" -- a bad write, not a
focus.

- Header: Phase -> Released (v7.17.2); Focus -> a real one-line focus.
- Added four session entries reconstructed from CHANGELOG.md, the merged PR
  bodies (#505, #506, #509, #513, #499, #514, #515) and the release tags:
  v7.17.0 (teach deploy safety + CI coverage), v7.17.1 (alias-proof
  pipelines), v7.17.2 (CI hardening + PATH fix), plus the 2026-07-08..07-19
  housekeeping commits and a session entry for this resync itself.
- Demoted the stale "Current Session (2026-07-07)" and two older headings
  that had been left as "Current Session" against the file's own convention.
- Test baseline refreshed from evidence rather than carried forward:
  84 passed / 0 failed / 0 timeout / 1 skipped across 85 registered suites,
  per CI run 33946019980 on dev.
- Next Action re-verified against repo state: added stale-issue triage
  (#487/#488/#489), the PR #500 rebase decision, .gitignore for
  .token-optimizer, and the advisory markdown-lint backlog.

Verified: scripts/check-status.zsh clean on the updated file (validator
confirmed non-vacuous via a planted "Progress: banana" defect, which it
caught); _flow_status_field reads all four header fields correctly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant