Skip to content

Add ~/.local/bin to PATH, remove redundant claude alias#8

Merged
davidkreps merged 2 commits intomainfrom
add-local-bin-to-path
Apr 13, 2026
Merged

Add ~/.local/bin to PATH, remove redundant claude alias#8
davidkreps merged 2 commits intomainfrom
add-local-bin-to-path

Conversation

@davidkreps
Copy link
Copy Markdown
Owner

Summary

  • Adds ~/.local/bin to PATH in .zshrc (guarded with a directory existence check)
  • Removes the per-tool claude alias — it's now redundant since claude lives in ~/.local/bin

Test plan

  • ./test.sh passes (36/36)
  • claude resolves in a new shell session

davidkreps and others added 2 commits April 12, 2026 21:00
~/.local/bin is the standard XDG location for user binaries. Adding it
to PATH directly means any tool installed there (including claude) resolves
automatically without a per-tool alias.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Apr 13, 2026

Claude finished @davidkreps's task in 2m 26s —— View job


PR Review

  • Read changed files and git diff
  • Review against CLAUDE.md conventions
  • Post review findings

Summary

This PR introduces two changes (commits 3cb5f02 and e075729):

  1. zsh/.zshrc — adds ~/.local/bin to PATH, guarded by a directory existence check
  2. zsh/aliases.zsh — removes the per-tool claude alias; also fixes a trailing space and extra blank line (the net diff against main after the merge commit)

Because main gained the .zshrc change through the PR #5 merge, the net diff is just the aliases.zsh whitespace cleanup — but the full intent of the PR is clear from the individual commits.


CLAUDE.md Checklist

Convention Status
Uses $HOME (not hardcoded paths)
No credentials / secrets committed
Tool guard: PATH entry guarded with [ -d "$HOME/.local/bin" ]
No stdout during shell init
Trailing newline on aliases.zsh ✅ (one trailing newline, no extra blank line)
Works on macOS and Linux
install.sh / test.sh consistency ✅ (no new symlinks — PATH is set in .zshrc)

Findings

zsh/.zshrc — PATH addition (3cb5f02)

# User-local binaries (XDG standard, e.g. pip --user, cargo, claude)
[ -d "$HOME/.local/bin" ] && export PATH="$HOME/.local/bin:$PATH"
  • Guard is correct — only prepends when the directory exists.
  • $HOME used throughout — portable. ✅
  • Prepends to PATH, giving user binaries priority over system ones. This is the conventional behavior and matches how ~/.cargo/bin, ~/.npm-global/bin etc. are handled elsewhere in the file. ✅

Minor note (non-blocking): Sourcing .zshrc multiple times in the same session will add ~/.local/bin to PATH repeatedly. This is a very common pattern and harmless in practice — zsh deduplicates paths with typeset -U path if configured, and the duplicate is invisible to users. No change needed.

zsh/aliases.zsh — claude alias removal (3cb5f02)

# Removed:
[ -x "$HOME/.claude/local/claude" ] && alias claude="$HOME/.claude/local/claude"

Removing this is correct now that ~/.local/bin is on PATH. The old path (~/.claude/local/claude) is where Claude CLI used to install; the current standard location is ~/.local/bin/claude. Dropping the alias in favour of the PATH entry is cleaner and handles future updates automatically. ✅

zsh/aliases.zsh — trailing whitespace cleanup (e075729)

Removes a trailing space from the nowdate alias and the extra blank line. Aligns with the CLAUDE.md rule that all files must end with exactly one trailing newline. ✅


Verdict

LGTM. The changes are clean, well-guarded, and consistent with the repo's conventions. No blocking issues.

@davidkreps davidkreps merged commit 4b201b5 into main Apr 13, 2026
2 checks passed
@davidkreps davidkreps deleted the add-local-bin-to-path branch April 13, 2026 01:07
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