Skip to content

feat: source ~/.myfiles/shell/claude.zsh from .zshrc#245

Merged
tamakiii-claude[bot] merged 1 commit intomainfrom
add/source-claude-launcher
Apr 26, 2026
Merged

feat: source ~/.myfiles/shell/claude.zsh from .zshrc#245
tamakiii-claude[bot] merged 1 commit intomainfrom
add/source-claude-launcher

Conversation

@tamakiii-doppelganger
Copy link
Copy Markdown
Contributor

Summary

  • Add one source line to .zshrc that activates the claude() shell function shipped in tamakiii/myfiles#219.
  • The guard [[ -f ~/.myfiles/shell/claude.zsh ]] keeps .zshrc loadable on hosts where the myfiles half hasn't been installed yet.

Context

tamakiii/myfiles#219 added shell/claude.zsh defining a claude() function that injects --add-dir <path> for each existing default path (~/.myfiles, ~/Documents/Obsidian/tamakiii-hdd, ~/Git/tamakiii/meta/main) before exec'ing the real binary via command claude. Without a sourcing line in .zshrc, the file is inert. This PR is that one-line companion.

The split exists because ~/.myfiles owns the launcher logic (private half of the dotfiles system) while ~/.dotfiles owns shell init.

Test plan

  • After merge + make install from ~/.dotfiles: open a fresh shell and run type claude. Should report claude is a shell function from /home/tamakiii/.myfiles/shell/claude.zsh instead of pointing at ~/.local/bin/claude.
  • claude --version should still print the version (the wrapper passes args through and execs the real binary).
  • On a host without ~/.myfiles installed (or before install completes), the file-test guard prevents a failure during shell startup.

Related to tamakiii/meta#276

🤖 Generated with Claude Code

Activates the `claude()` shell function shipped in tamakiii/myfiles#219,
which pre-loads frequently used --add-dir paths (~/.myfiles, the
Obsidian vault, ~/Git/tamakiii/meta/main) so they don't have to be
re-added by hand at the start of each Claude Code session.

The guard `[[ -f ... ]]` keeps .zshrc loadable on hosts where the
myfiles half hasn't been installed yet.

Related to tamakiii/meta#276

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

@tamakiii-claude tamakiii-claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One-line companion to tamakiii/myfiles#219 (now merged), exactly as specified in tamakiii/meta#276. The [[ -f ~/.myfiles/shell/claude.zsh ]] guard prevents .zshrc startup failures on hosts where the myfiles half hasn't installed yet, which matches the same defensive posture as the launcher's missing-path filtering. Body references both #276 (issue) and #219 (sibling PR) with markdown links and uses Related to per the manual-closure convention. Pre-existing modifications elsewhere in the dotfiles working tree were correctly left unstaged. Approving.

@tamakiii-claude tamakiii-claude Bot merged commit 9771f6d into main Apr 26, 2026
1 check passed
@tamakiii-claude tamakiii-claude Bot deleted the add/source-claude-launcher branch April 26, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement tamakiii/dotfiles From tamakiii/dotfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants